Created
November 21, 2016 22:56
-
-
Save julesx/3c4fbd0d7dc845d04fe38979bea0076a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using Discord; | |
using Discord.WebSocket; | |
using FATMAN.Managers; | |
namespace FATMAN.Responders | |
{ | |
public class UserPresenceUpdatedResponder | |
{ | |
private Dictionary<ulong, string> _personalizedGifs = new Dictionary<ulong, string>() | |
{ | |
{ 90548197604212736, "http://i.imgur.com/biDFHU0.gif" }, //me | |
{ 226749613154107392, "http://www.reactiongifs.com/wp-content/uploads/2013/06/supa-hot-fire.gif" }, //gman | |
{ 229357796691410944, "http://i.imgur.com/kIS2bKX.gif" }, //corey | |
{ 171392216390959106, "https://media.giphy.com/media/26tjZlGxNsLeIXpfi/giphy.gif" }, //chris | |
{ 230715453687726081, "https://media.giphy.com/media/ReltUjiLEcpdS/giphy.gif" }, //mo | |
{ 228350284148113409, "https://media.giphy.com/media/12YpCtHZrngfa8/giphy.gif" }, //sean | |
{ 242401114295631875, "https://media0.giphy.com/media/JOttuKV7UDVHa/giphy.gif" }, //martin | |
}; | |
public async Task RespondAsync(Optional<SocketGuild> arg1, SocketUser arg2, SocketPresence arg3, SocketPresence arg4) | |
{ | |
if (arg3.Status == UserStatus.Offline && arg4.Status == UserStatus.Online) | |
{ | |
var message = ":trumpet: **<@!" + arg2.Id + ">** has joined us. Herald his arrival! :trumpet:"; | |
if (_personalizedGifs.ContainsKey(arg2.Id)) | |
message += Environment.NewLine + _personalizedGifs[arg2.Id]; | |
await DiscordManager.Instance.SpeakTextChannel.SendMessageAsync(message); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment