shbot/clear_commands.py

31 lines
785 B
Python
Raw Permalink Normal View History

2022-02-01 11:34:51 +01:00
import discord
2022-03-07 05:01:52 +01:00
import asyncio
import time
import datetime
import random
2022-02-01 11:34:51 +01:00
import os
2022-05-19 01:59:27 +02:00
import sys
2022-02-01 11:34:51 +01:00
from os import system
from os import environ
from discord.ext import commands
2022-03-07 05:01:52 +01:00
from discord.commands import Option
from discord.commands import permissions
from discord.ui import InputText, Modal
2022-02-01 11:34:51 +01:00
2022-03-07 05:01:52 +01:00
intents = discord.Intents.default()
intents.members = True
intents.message_content = True
2022-02-01 11:34:51 +01:00
token = os.environ['TOKEN']
prefix = os.environ['PREFIX']
bot = commands.Bot(intents=intents, command_prefix=prefix)
@bot.event
2022-03-07 05:01:52 +01:00
async def on_connect():
2022-02-01 11:34:51 +01:00
print("Bot ready on Version %s..." % discord.__version__)
2022-05-19 01:37:40 +02:00
await bot.sync_commands(commands=[], guild_ids=[261575556708040705])
2022-05-19 02:29:09 +02:00
await bot.register_commands(commands=[], guild_id=261575556708040705)
await bot.close()
2022-05-19 01:59:27 +02:00
os._exit(0)
2022-02-01 11:34:51 +01:00
bot.run(token)