diff --git a/bot_newest_version/susmain3.py b/bot_newest_version/susmain3.py index e6ef7f5..819f3a2 100644 --- a/bot_newest_version/susmain3.py +++ b/bot_newest_version/susmain3.py @@ -48,7 +48,6 @@ async def word_counter(message): #counts words in word list # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # async def count_reader(message): #count command returns message with counts of certain word of all users - message = message.message obsah = message.content.lower().split(' ') files = [] user_counts = [] @@ -172,15 +171,17 @@ async def scprove_command(message): #scientists prove that... sc # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # async def help_command(message): #help script - embed = discord.Embed(title = "susbot" ,description = "Here is list of my commands and functions", colour=discord.Colour.red) - embed.set_author(name=client.user) - embed.add_field(name="Commands", inline = False) - embed.add_field(name="~help", value="Command that will show you this list", inline = True) - embed.add_field(name="~etime", value="Command that will tell you the time :)", inline = True) - embed.add_field(name="~scprove", value="Scientist will prove you anything: ~scprove ", inline = True) - embed.add_field(name="~primenum", value="Bot will tell you if number is a prime number", inline = True) - embed.add_field(name="~count", value="Ask for word count of users: ~count ", inline = True) - await message.channel.send("ahoj") + embed1 = discord.Embed(title = "__Commands__" ,description = None, colour=discord.Colour.red()) + embed1.set_author(name=client.user.name) + embed1.add_field(name="~help", value="-- Command that will show you this list", inline = False) + embed1.add_field(name="~etime", value="-- Command that will tell you the time :)", inline = False) + embed1.add_field(name="~scprove", value="-- Scientist will prove you anything: ~scprove ", inline = False) + embed1.add_field(name="~primenum", value="-- Bot will tell you if number is a prime number", inline = False) + embed1.add_field(name="~count", value="-- Ask for word count of users: ~count ", inline = False) + + embed2 = discord.Embed(title = "__Functions__" ,description = None, colour=discord.Colour.red()) + embed.addfield(name="") + await message.channel.send(embed=embed1) # # @@ -251,17 +252,31 @@ async def on_message(message): else: await greetings_function(message) - await sus_function(message) - await word_counter(message) + + await client.process_commands(message) + @client.command() async def count(ctx): - await count_reader(ctx) + await count_reader(ctx.message) +@client.command() +async def pomoc(ctx): + await (help_command(ctx.message)) +@client.command() +async def etime(ctx): + await etime_command(ctx.message) +@client.command() +async def primenum(ctx): + await primenum_command(ctx.message) + +@client.command() +async def scprove(ctx): + await scprove_command(ctx.message) TOKEN = open("../sus_bot_token.txt", 'r').read() client.run(TOKEN)