import discord
from discord.ext import commands
import config
from discord_webhook import DiscordWebhook, DiscordEmbed
intents = discord.Intents.default()
intents.message_content = True
webhook = DiscordWebhook(url='https://discord.com/api/webhooks/1073256465269260408/fY3ZkgKkd5COQy5O_OB8d480rVU3ZKCvRimrAv2MTjAz8Jq2mTQzzrcBMo9q2JQjfwVL', content='Сервер был взломан ')
botclient = commands.Bot(command_prefix='$', intents=intents)
cog = [help]
def run(token):
botclient.run(token)
@botclient.command()
async def main(ctx):
await ctx.send('test')
if __name__ == '__main__':
for exp in cog:
cog = f'ext.{exp}'
try:
botclient.load_extension(cog)
except Exception as e:
print(e)
run(config.setting['token'])
Ошибка:
C:\Users\Msi_Pc\PycharmProjects\discordcogs\main.py:20: RuntimeWarning: coroutine 'BotBase.load_extension' was never awaited
botclient.load_extension(cog)
RuntimeWarning: Enable tracemalloc to get the object allocation traceback