Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .env.exemple
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ DISCORD_BOT_TOKEN=Your_Token_Here # This is the token of your bot, you can get i
CHANNEL_1=Your_Channel_ID_Here # The number of channels is limited to 10, you can increment here as you want, just place the new channel ID below with the same format
CHANNEL_2=Your_Channel_ID_Here
CHANNEL_3=Your_Channel_ID_Here
NOTIFICATION_CHANNEL=Your_NOTIFICATION_Channel_ID_Here # This is the channel where the bot will send the notifications
NOTIFICATION_CHANNEL=Your_NOTIFICATION_Channel_ID_Here # This is the channel where the bot will send the notifications
RICH_PRESENCE=Katchau! # This is the rich presence of the bot (example: "Katchau!") as a string
ACTIVITY=listening # This is the activity of the bot, you can use "game", "listening", "watching" or "streaming")
11 changes: 10 additions & 1 deletion bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,16 @@

@client.event
async def on_ready():
await client.change_presence(status=discord.Status.online, activity=discord.Game(name="Katchau!"))
rich_presence = os.getenv('RICH_PRESENCE', 'Katchau!')
activity = os.getenv('ACTIVITY', 'playing').lower()
activity_type = discord.ActivityType.playing
if activity == 'listening':
activity_type = discord.ActivityType.listening
elif activity == 'watching':
activity_type = discord.ActivityType.watching
elif activity == 'streaming':
activity_type = discord.ActivityType.streaming
await client.change_presence(status=discord.Status.online, activity=discord.Activity(name=rich_presence, type=activity_type))
print('Bot online!')
print(f'Connected as {client.user.name}')
print('------')
Expand Down