-
Notifications
You must be signed in to change notification settings - Fork 1
/
bot.py
37 lines (26 loc) · 788 Bytes
/
bot.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
30
31
32
33
34
35
36
37
import discord
from discord.ext import commands
from dotenv import load_dotenv
import os
load_dotenv()
# https://discord.com/api/oauth2/authorize?client_id=824410926937407529&permissions=387136&scope=bot
def get_prefix(bot,message):
prefixes = ['.gacha ']
return commands.when_mentioned_or(*prefixes)(bot, message)
bot = commands.Bot(command_prefix=get_prefix)
bot.remove_command("help")
@bot.event
async def on_ready():
print(f"Bot connected as {bot.user} in {len(bot.guilds)} servers.")
await bot.change_presence(activity=discord.Activity(
name="Genshin Impact",
state="Spending Primogems"
)
)
modules = [
"wish",
"help"
]
for module in modules:
bot.load_extension(f"cogs.{module}")
bot.run(os.getenv("BOT_TOKEN"))