Don't change status in on_ready

pull/90/head
Stijn De Clercq 2021-09-05 16:09:10 +02:00
parent 768f43ade9
commit 2f5e5147dc
2 changed files with 8 additions and 7 deletions

View File

@ -8,10 +8,9 @@ from discord.ext import commands
from functions import checks, easterEggResponses, stringFormatters
from functions.database import stats, muttn, custom_commands, commands as command_stats
import pytz
from settings import READY_MESSAGE, SANDBOX, STATUS_MESSAGE
from settings import READY_MESSAGE, SANDBOX
from startup.didier import Didier
import time
import traceback
class Events(commands.Cog):
@ -35,9 +34,6 @@ class Events(commands.Cog):
"""
Function called when the bot is ready & done leading.
"""
# Set status
await self.client.change_presence(status=discord.Status.online, activity=discord.Game(STATUS_MESSAGE))
print(READY_MESSAGE)
# Add constants to the client as a botvar

View File

@ -1,18 +1,23 @@
import discord
from dotenv import load_dotenv
from functions.prefixes import get_prefix
from settings import TOKEN
from settings import STATUS_MESSAGE, TOKEN
from startup.didier import Didier
if __name__ == "__main__":
load_dotenv(verbose=True)
# Activities
activity = discord.Activity(type=discord.ActivityType.playing, name=STATUS_MESSAGE)
status = discord.Status.online
# Configure intents (1.5.0)
intents = discord.Intents.default()
intents.members = True
client = Didier(command_prefix=get_prefix, case_insensitive=True, intents=intents)
client = Didier(command_prefix=get_prefix, case_insensitive=True, intents=intents, activity=activity, status=status)
# Run IPC server if necessary
if client.ipc is not None:
client.ipc.start()