-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bot offline when i told it to be online #10041
Comments
The code you have provided does not show how and where you start your bot, either by calling |
@bot.event
async def on_ready():
global session_id
session_id = bot.ws.session_id
update_session()
await tree.sync()
print(f'Logged in as {bot.user}')
await recreate_ticket_message()
try:
await update_presence()
await bot.change_presence(status=discord.Status.online)
await recreate_status_messages(bot)
await status_message_ready()
await status_message_update()
await assign_member_role()
await fetch_history()
tasks.clear_task.start()
except pypresence.exceptions.DiscordNotFound as e:
print(e)
except Exception as e:
print(e)
print("calling change_presence")
await bot.change_presence(status=discord.Status.online)
if __name__ == "__main__":
import variables
bot_token = variables.DISCORD_BOT_TOKEN
atexit.register(lambda: asyncio.run(on_shutdown()))
try:
bot.run(bot_token)
except KeyboardInterrupt:
asyncio.run(on_shutdown()) |
please rtfm (quickstart, introduction, api reference) |
You should not do any API calls in And prevent the usage of |
Summary
its hsould be online but its offline
Reproduction Steps
await bot.change_presence(status=discord.Status.online)
its still offline
Minimal Reproducible Code
Expected Results
to be online
Actual Results
is offline
Intents
intents = discord.Intents.default() intents.messages = True intents.guilds = True intents.members = True intents.message_content = True bot = commands.Bot(command_prefix="!", intents=intents) tree = bot.tree
System Information
Checklist
Additional Context
discord shows that its online but the program says that its offline
The text was updated successfully, but these errors were encountered: