Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

discord.py change status

# Playing ____
await bot.change_presence(activity=discord.Game(name='Minecraft'))
# Streaming ____
await bot.change_presence(activity=discord.Streaming(name="Chess", url=twitch_url))
# Watching ____
await bot.change_presence(activity=discord.Activity(type=discord.ActivityType.watching, name="Harry Potter"))
# Competing in ____
await bot.change_presence(activity=discord.Activity(type=discord.ActivityType.competing, name="the House Cup"))
# Listening to ____
await bot.change_presence(activity=discord.Activity(type=discord.ActivityType.listening, name="!help"))
Comment

discord.py read custom status

@bot.command() #use @client.command here if you are using client to alternate commands.Bot
async def customstatus(ctx):
    for s in ctx.author.activities:
        if isinstance(s, discord.CustomActivity):
            print(s)
Comment

PREVIOUS NEXT
Code Example
Python :: sample one point from distribution python 
Python :: bill wiliams fractal python pandas 
Python :: date format flouytter 
Python :: Flask migration method, see the artcle for more info 
Python :: Free the Bunny Prisoners 
Python :: compute slice distance from image position 
Python :: u00a0 
Python :: how to filter csv file by columns 
Python :: machine learning cheatsheet activation function 
Python :: representation of multidimensional array in data structure 
Python :: python union type 
Python :: i have installed python modules but pycharm cannot run 
Python :: flask new response style with `make_response` 
Python :: get multiples of a number between two numbers python 
Python :: Adding new fields in ModelAdmin with fieldsets to edit user, and add_fieldsets whan creating a new user 
Python :: generate-thumbnails-in-django-with-pil 
Python :: threshhold crossing on list python 
Python :: matplotlib set dpi 300 
Python :: bogo sort 
Python :: python check if dictionary empty 
Python :: python read file to eof 
Python :: flask_uploads.exceptions.UploadNotAllowed 
Python :: how to detect the body with cv2 
Python :: Define a python function day_of_week, which displays the day name for a given date supplied in the form (day,month,year). 
Python :: total keywords in python 
Python :: sns plot standard form 
Python :: requests session 
Python :: how to reverse a number 
Python :: python 1.0 
Python :: if else condition python 
ADD CONTENT
Topic
Content
Source link
Name
2+4 =