Skip to content

Instantly share code, notes, and snippets.

@msciotti
Last active March 8, 2017 01:49
Show Gist options
  • Save msciotti/7854499bd63a565bf2340dc23b3c0cda to your computer and use it in GitHub Desktop.
Save msciotti/7854499bd63a565bf2340dc23b3c0cda to your computer and use it in GitHub Desktop.
using Discord;
class Program
{
static void Main(string[] args) => new Program().Start();
public void Start()
{
var client = new DiscordClient();
client.MessageReceived += async (s, e) =>
{
if (!e.Message.IsAuthor)
await e.Channel.SendMessage($"{e.Message.User.Mention} is awesome!");
};
client.ExecuteAndWait(async () => {
await client.Connect("MY_BOT_TOKEN_HERE", TokenType.Bot);
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment