I’m working on a Discord bot and attempting to display a custom ‘Playing’ status, but I’m running into syntax errors in my code. Below is a revised example:
public class BotActivityHandler : ModuleBase<SocketCommandContext>
{
private DiscordSocketClient myClient;
public async Task UpdateActivityAsync()
{
var activityMessage = "snacking on chips";
await myClient.SetGameAsync(activityMessage, null, ActivityType.Playing);
}
}
In this snippet, the intent is to have the bot show that it is playing by updating its status. However, I receive errors such as ‘Invalid expression term’ and messages about missing commas. I’m looking for a fully corrected example that properly sets the bot’s game status without these syntax issues.