blob: cbaafd9afd9b91168613a73662223860c3f149c3 (
plain) (
blame)
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
|
import discord
from discord.ext import commands
import os
from dotenv import load_dotenv
import utils
load_dotenv()
bot = commands.Bot(command_prefix="t!", activity=discord.Activity(name="for commands", type=discord.ActivityType.watching))
bot.help_command = utils.MyHelpCommand(command_attrs={'hidden':True})
@bot.event
async def on_ready():
print(f'Logged in as {bot.user.display_name}!')
@bot.event
async def on_command_error(ctx, error):
await utils.parse_error(ctx, error)
@bot.event
async def on_message(message):
if bot.user.mentioned_in(message):
ctx = await bot.get_context(message)
ctx.reply("<irritatered:766468833564688395>")
await bot.process_commands(message)
def load_extensions(bot):
extensions = ['cogs.fun', 'cogs.about', 'cogs.modrinth']
if __name__ == '__main__':
for i in extensions:
bot.load_extension(i)
bot.load_extension('jishaku')
load_extensions(bot)
bot.run(os.getenv("TOKEN"))
|