Skip to content

Instantly share code, notes, and snippets.

View 112RG's full-sized avatar

Rylee George 112RG

View GitHub Profile
@112RG
112RG / Program.cs
Created February 27, 2017 12:39
Test
class Program
{
private Logger _log;
private CommandService commands;
private DiscordShardedClient client;
private DependencyMap map;
string token = File.ReadAllText(@"token.txt");
static void Main(string[] args) => new Program().Start().GetAwaiter().GetResult();
class Program
{
private Logger _log;
private CommandService commands;
private DiscordShardedClient client;
private DependencyMap map;
string token = File.ReadAllText(@"token.txt");
static void Main(string[] args) => new Program().Start().GetAwaiter().GetResult();
@112RG
112RG / microservice.md
Created October 21, 2018 04:09
Discord bot. Microservice a love hate

Please read this gist by DasWolke it goes into a much better explanation of why you should use microservice Discord bots.

This is about my experience in making a microservice discord bot.

To start let's look at the core design I was looking for in creating my bot

(https://i.imgur.com/bWxXyc3.png)

I was looking to have multiple gateways that serve different shards groups this design could allow for a beta or premium version of the bot to be hosted on the same service more easily. I also wanted plug and play workers that don't store any information and could be restarted or crash without having any downtime and be scaled just by changing the replica value in docker swarm.