static void Main(string[] args)
DiscordSocketClient client = new DiscordSocketClient(new DiscordSocketConfig()
// fun fact: intents are required for bots as of v8, which Anarchy uses by default.
Intents = DiscordGatewayIntent.Guilds | DiscordGatewayIntent.GuildMessages
client.OnLoggedIn += client_OnLoggedIn;
client.OnMessageReceived += client_OnMessageReceived;
client.Login("your token here");
// The -1 will make the thread sleep until the program is closed.
private void client_OnLoggedIn(DiscordSocketClient client, LoginEventArgs args)
client.SetActivity(new StreamActivityProperties()
Name = "Powered by Anarchy",
Url = "https://www.twitch.tv/ilinked" // the url must be a twitch channel
private void client_OnMessageReceived(DiscordSocketClient client, MessageEventArgs args)
if (args.Message.Mentions.Any(u => u.Id == client.User.Id) || args.Message.MentionedEveryone)
args.Message.Channel.SendMessage("shut up, retard");