-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbot.py
46 lines (40 loc) · 1.05 KB
/
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
38
39
40
41
42
43
44
45
46
# imports
import os
import discord
from discord import app_commands
from discord.ext import commands
from dotenv import load_dotenv
# load env file
load_dotenv()
DISCORD_TOKEN = os.getenv('DISCORD_TOKEN')
intents = discord.Intents.default()
client = commands.Bot(command_prefix='!', intents=intents)
# start bot
@client.event
async def on_ready():
try:
synced = await client.tree.sync()
print("Bot is ready!")
print(f"Synced {len(synced)} command(s)")
except Exception as e:
print(e)
# cat snowball
@client.tree.command(name='cat', description="cat SnowBall")
@app_commands.describe(
name="@ someone"
)
async def cat(interaction: discord.Interaction, name: str):
await interaction.response.send_message(
f"""
好无聊逗逗{name}吧
嘬嘬嘬𐃆 ˒˒ ͏
͏
͏
͏
͏ ╱|、
(˚ˎ 。7
|、˜ 〵
じしˍ,)ノ
"""
)
client.run(DISCORD_TOKEN)