mirror of https://github.com/stijndcl/didier
Don't change status in on_ready
parent
768f43ade9
commit
2f5e5147dc
|
@ -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
|
||||
|
|
|
@ -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()
|
||||
|
||||
|
|
Loading…
Reference in New Issue