Know-Legal Web Search

Search results

  1. Results From The WOW.Com Content Network
  2. You can use the following lines of code, depending on which activity you want to change the bot to: # Setting `Playing ` status await bot.change_presence(activity=discord.Game(name="a game")) # Setting `Streaming ` status await bot.change_presence(activity=discord.Streaming(name="My Stream", url=my_twitch_url)) # Setting `Listening ` status await bot.change_presence(activity=discord.Activity ...

  3. How to get users status from the discord API (URL)

    stackoverflow.com/questions/63638376

    I'm trying to get status of a user without using any discord API language (eg. discord.py discord.js). The problem I'm having is getting a user from the discord API doesn't return the users status,...

  4. It's not their official API but its well documented, From what I understood is you want to make a discord bot with a command that shows the status of the server on pterodactyl. You would need to make a request first to list all the servers. With a client key. Through /api/client Then get the external_id of the server you want to view the status ...

  5. How to display discord bot server count upon startup?

    stackoverflow.com/questions/63485461

    1. I'm currently working on a discord bot, and I was wondering if anyone knew how to display the number of servers the bot is in upon running it in the terminal. Any help would be greatly appreciated. Here is the startup message code (which includes the status code as well): console.log('Bot is online.') client.user.setStatus('available')

  6. You can use tasks.loop for that, here's how:. from discord.ext import tasks @tasks.loop(seconds=60.0) async def my_background_task(): """Will loop every 60 seconds and change the bots presence""" await bot.change_presence(...) @bot.event async def on_ready(): # Waiting until the bot is ready await bot.wait_until_ready() # Starting the loop my_background_task.start()

  7. How can I get the current bot status? - Stack Overflow

    stackoverflow.com/questions/58770859

    1. To check a user's status using discord.js you can go to the Presence class within User, so you would need something like bot.user.presence.status. As stated in the docs this status is a string that can either be: online - user is online. idle - user is AFK. offline - user is offline or invisible. dnd - user is in Do Not Disturb.

  8. You will need to await it and get the presence from there. (async () => { //await needs async. const user = await client.users.fetch('Users ID'); const usersStatus = user.presence.status. })() Additionally, you won't get any users if the client is not ready. You should make sure this is in your ready event so the client fetches the user properly.

  9. 4. You need to use client.setActivity() and then use the client.guilds.cache.size value. For example: client.setActivity(`serving ${client.guilds.cache.size} servers`); answered Aug 14, 2020 at 19:52. Androz2091. 2,985 2 10 29. Perfect! It would be better if you can mark this answer as correct.

  10. I am trying to set my discord bot's status differently depending on the discord server. I know how to set the status using client.user.setActivity. However I want to be able to set a different status for each discord server. Is this even possible?

  11. Discord.js: How read users status with a bot on server?

    stackoverflow.com/questions/46024245

    Welcome to Stack Overflow! While this code may solve the question, including an explanation of how and why this solves the problem would really help to improve the quality of your post, and probably result in more up-votes.