From a4aaa134bb967c345c25f7517835810ea3063d4e Mon Sep 17 00:00:00 2001 From: root Date: Sun, 2 Feb 2020 14:41:45 +0100 Subject: [PATCH] Changed conversion --- cogs/fun/autoconvert.py | 6 +++--- data/count.py | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 data/count.py diff --git a/cogs/fun/autoconvert.py b/cogs/fun/autoconvert.py index bf6bf37..abb0a5a 100644 --- a/cogs/fun/autoconvert.py +++ b/cogs/fun/autoconvert.py @@ -65,12 +65,12 @@ class AutoConvert(commands.Cog): for currency in self.currencies: if currency == element[1]: continue - currency_string += f"{self.convert_currency(element[1], currency, element[0])}{currency}, " - embed.add_field(name=str(element[0])+element[1], value=currency_string[:-2]) + currency_string += f"{currency}{self.convert_currency(element[1], currency, element[0])}, " + embed.add_field(name=element[1]+str(element[0]), value=currency_string[:-2]) if not empty: await message.channel.send(embed=embed) def setup(client: discord.Client): - client.add_cog(AutoConvert(client)) \ No newline at end of file + client.add_cog(AutoConvert(client)) diff --git a/data/count.py b/data/count.py new file mode 100644 index 0000000..0796d91 --- /dev/null +++ b/data/count.py @@ -0,0 +1,5 @@ +count=0 +with open('naughty_step.txt', 'r') as file: + for line in file: + count += len(line) +print(count)