Hey people that are developers out there. I am having some trouble with my discord bot displaying the status but refreshing each time a new member joins.
If you're able to help a homie out, would be extra cool.
Here is my code:
If you're able to help a homie out, would be extra cool.
Here is my code:
import datetime
import discord;
from discord.ext import commands
from discord.utils import get
import asyncio
intents = discord.Intents().all()
client = commands.Bot(command_prefix = '!', intents=intents)
#Bot Status
@client.event
async def on_ready():
servers = len(client.guilds)
members = 0
for guild in client.guilds:
members += guild.member_count - 1
await client.change_presence(activity = discord.Activity(
type = discord.ActivityType.watching,
name = f' {members} members!'
))
