-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbot.py
29 lines (21 loc) · 797 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
import calendar
import time
import json
import os
import disnake
from disnake.ext import commands
from discord_token import TOKEN
intents = disnake.Intents.default()
intents.message_content = True
bot = commands.Bot(command_prefix="!", intents=intents)
timestamp = calendar.timegm(time.gmtime())
def check_if_it_is_me(ctx):
return ctx.message.author.id == 276627005280092162
@bot.event
async def on_ready():
await bot.change_presence(status = disnake.Status.dnd, activity = disnake.Game(name = f"为 {len(bot.guilds)} 个服务器提供色图"))
for filename in os.listdir("./Cogs"):
if filename.endswith(".py") and filename != "settings.py" and not (filename.startswith("__")):
bot.load_extension(f"Cogs.{filename[:-3]}")
if __name__ == "__main__":
bot.run(TOKEN)