-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFichbot.py
More file actions
28 lines (23 loc) · 717 Bytes
/
Fichbot.py
File metadata and controls
28 lines (23 loc) · 717 Bytes
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
import discord, json, time
from discord.ext import commands
from functions import command_selection
from discord.ext import slash
c = open("BotFiles/config.json")
json_data = json.load(c)
token = json_data["token"]
intents = discord.Intents.all()
bot = slash.slashBot(command_prefix='!', intents=intents)
@bot.event
async def on_ready():
print(f'{bot.user} has connected to Discord!')
@bot.slash_cmd()
async def test(ctx):
await ctx.send('!test')
@bot.slash_cmd(hidden=True)
async def clear(ctx, number):
messages = await ctx.channel.history(limit=int(number)).flatten()
for message in messages:
await message.delete()
bot.run(token)
#client = MyClient(intents=intents)
#client.run(token)