-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
29 lines (23 loc) · 786 Bytes
/
main.py
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
import os
from keep_alive import keep_alive
from discord.ext import commands
bot = commands.Bot(
command_prefix="!", # Change to desired prefix
case_insensitive=True # Commands aren't case-sensitive
)
bot.author_id = os.environ['DISCORD_AUTHOR_ID'] # Change to your discord id!!!
@bot.event
async def on_ready(): # When the bot is ready
print("I'm in")
print(bot.user) # Prints the bot's username and identifier
# Name extensions to add to bot
extensions = [
'cogs.dev',
'cogs.defi'
]
if __name__ == '__main__': # Ensures this is the file being ran
for extension in extensions:
bot.load_extension(extension) # Loades every extension.
keep_alive() # Starts a webserver to be pinged.
token = os.environ["DISCORD_BOT_SECRET"]
bot.run(token) # Starts the bot