I have a Discord bot written in DiscordJS installed on some servers. I added an Activity to it (a mini-game). In all the docs I see and in testing I am able to launch my activity by clicking the little Activity Launch icon which opens up a new screen showing my app activities plus promoted and featured activities from other developers.
Instead of my users having to click this icon then launch the activity is it possible to code an embed button or a slash command response from my bot code that will launch the activity directly? Or which will generate a new embed with a new button in the text channel to launch the activity.
Basically, can I launch an activity without going through the Activity Launcher step?
I have a Discord bot written in DiscordJS installed on some servers. I added an Activity to it (a mini-game). In all the docs I see and in testing I am able to launch my activity by clicking the little Activity Launch icon which opens up a new screen showing my app activities plus promoted and featured activities from other developers.
Instead of my users having to click this icon then launch the activity is it possible to code an embed button or a slash command response from my bot code that will launch the activity directly? Or which will generate a new embed with a new button in the text channel to launch the activity.
Basically, can I launch an activity without going through the Activity Launcher step?
Share Improve this question edited Mar 22 at 15:51 Neil Collier asked Mar 21 at 15:52 Neil CollierNeil Collier 112 bronze badges1 Answer
Reset to default 0You can create an invite to a voice channel with a targetApplication, like so:
voiceChannel.createInvite({
targetType: InviteTargetType.EmbeddedApplication,
targetApplication: yourActivity,
});
https://discord.js./docs/packages/discord.js/14.18.0/InviteCreateOptions:Interface
You can then send the invite link which renders as a banner with your activity's name and a big green "Start" button.