This commit is contained in:
Paillat
2022-12-16 12:54:21 +01:00
9 changed files with 153 additions and 41 deletions

View File

@@ -5,18 +5,27 @@ from discord import Intents
import asyncio # pip install asyncio
import cogs # import the cogs
import datetime # pip install datetime
from config import debug, conn, c # import the debug function and the database connection
import apsw # pip install apsw. ApSW is a Python interface to SQLite 3
from config import debug, conn, c # import the debug function and the database connectionimport apsw # pip install apsw. ApSW is a Python interface to SQLite 3
#add the message content intent to the bot, aka discord.Intents.default() and discord.Intents.message_content
intents = discord.Intents.default()
intents.message_content = True
bot = discord.Bot(intents=intents, help_command=None) # create the bot
import apsw # pip install apsw. ApSW is a Python interface to SQLite 3
intents = discord.Intents.default()
intents.message_content = True
intents.members = True
bot = discord.Bot(intents=intents, help_command=None) # create the bot
bot.add_cog(cogs.Setup(bot))
bot.add_cog(cogs.Settings(bot))
bot.add_cog(cogs.Help(bot))
bot.add_cog(cogs.Chat(bot))
bot.add_cog(cogs.ManageChat(bot))
@bot.event
async def on_ready():
await bot.change_presence(activity=discord.Activity(type=discord.ActivityType.watching, name="your messages to answer you"))
debug("Bot is ready")
#run the bot
# Replace the following with your bot's token
@@ -28,4 +37,4 @@ bot.run(key)
@bot.event
async def on_ready():
await bot.change_presence(activity=discord.Activity(type=discord.ActivityType.watching, name="your messages to answer you"))
debug("Bot is ready")
debug("Bot is ready")