-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
52 lines (42 loc) · 2.29 KB
/
main.py
File metadata and controls
52 lines (42 loc) · 2.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import os
from discord.ext import commands
#"!" becomes the prefix for all commands (ex: !ping)
client = commands.Bot(command_prefix = "!")
#Indicates if bot is active
@client.event
async def on_ready():
print("Bot is ready.")
@client.command()
async def load(ctx, extension):
client.load_extension(f'cogs.{extension}')
@client.command()
async def unload(ctx, extension):
client.unload_extension(f'cogs.{extension}')
#Looking through all files in cogs directory (specifically .py files)
for filename in os.listdir('./cogs'):
if filename.endswith('.py'):
client.load_extension(f'cogs.{filename[:-3]}') #removes .py
##################################################################
#All commands
@client.command()
async def commands(ctx):
await ctx.channel.send("```"
"\n!anime [anime name] : gives anime info (rating/eps/etc.)\n"
"\n!aoe [civilization] : gives civ's uniques\n"
"\n!camel [item] : gives graph of item's price through time, including highest and lowest\n"
"\n!coin [crypto coin/token] : gives price and daily change of the coin/token\n"
"\n!covid : gives Covid stats today\n"
"\n!et [word] : gives word etymology\n"
"\n!flip : pile ou face\n"
"\n!gas [~~/~~] : gives gas price\n"
"\n!ge [item] : gives OSRS item price and change overtime\n"
"\n!table [england/spain/italy/germany] : gives football/soccer league table\n"
"\n!weather : gives 8 days forecast\n"
"\n!foot [~~/~~] : gives park availability\n"
"\n[OFFLINE] !remindme [unit] [time unit] [message] : reminder (ex:!remind me 5 min take out the trash\n"
"\n!steam [game] : gives Steam game and discount (if available)\n"
"\n!stock [NASDAQ] : gives Stock's relevant information (current price, change, volume, etc.)"
"```")
##################################################################
#Must be the last line of code
client.run("TOKEN HERE")