#can someone help me about changing activity
1 messages · Page 1 of 1 (latest)
Hey! Once your issue is solved, press the button below to close this thread!
i've imported these
Making a bot presence requires making an activity, like so:
activity = interactions.Activity.create(
name="with interactions.py",
type=interactions.ActivityType.PLAYING
)
If you simply want a presence when your bot boots up, provide it when you initialize your bot:
client = interactions.Client(
status=interactions.Status.DO_NOT_DISTURB,
activity=activity,
)
Otherwise, just change it through change_presence:
await client.change_presence(
status=interactions.Status.DO_NOT_DISTURB,
activity=activity,
)
it's not a good practice to import everything using *
either just import interactions, or import all classes you need from interactions
okay
i didn't understand this can you help
have you tried launching the bot? For me, it looks like it's your pylance that is erroring because it doesn't know where Status is from
if you want
but I recommend you to set it directly in the Client definition, if you don't change it at runtime
no no no, client is your bot instance, you don't want to create a new one
oh wait I see
interactions.py v4 is no longer supported. Please upgrade to the latest version and use the migration guide to upgrade your code.
am i using v4?
please read the guide, and the docs, it's a whole new lib
okay thanks