K
K
Kirill2019-09-20 19:52:19
Python
Kirill, 2019-09-20 19:52:19

How to make a Discord bot play/watch?

Many bots have it written, for example, plays !, *, >, etc. I want my bot to have it written the same way.

Library
I have a regular discord library. Here is a piece of code (I know there are 2 discord libraries)
@bot.command()
async def привет(ctx):
    await ctx.send("Привет :wink:!")

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
DmitrNy ---, 2019-10-08
@kirilla39

I can not understand what, it was so difficult to simply answer the question? Dude, if you haven't answered yet, here's
@bot.event
async def on_ready():
while True:
game = discord.Game("here is your text that will be displayed in "Playing in"")
await bot.change_presence(status= discord.Status.idle, activity=game)

A
Anton Neverov, 2019-09-20
@TTATPuOT

"Regular library" - what exactly is it? discord.py?
I don't know how in Python, JavaScript uses the setPresence() method.
The analogue, most likely, is: https://discordpy.readthedocs.io/en/latest/ext/com...

M
micdor007, 2021-01-21
@micdor007

I’ll tell you right now how to use javascript discord.py
HERE:
client.on("ready", () => {
client.user.setActivity(`your text here`, {type: 'PLAY'});
});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question