externalized pats/cries
This commit is contained in:
parent
c1ccc7d4d2
commit
bc0da6e8c2
@ -12,5 +12,23 @@ namespace NadekoBot.Classes.JSONModels {
|
||||
119174277298782216,
|
||||
143515953525817344
|
||||
};
|
||||
public string[] CryResponses = {
|
||||
"http://i.imgur.com/Xg3i1Qy.gif",
|
||||
"http://i.imgur.com/3K8DRrU.gif",
|
||||
"http://i.imgur.com/k58BcAv.gif",
|
||||
"http://i.imgur.com/I2fLXwo.gif"
|
||||
};
|
||||
|
||||
public string[] PatResponses = {
|
||||
"http://i.imgur.com/IiQwK12.gif",
|
||||
"http://i.imgur.com/JCXj8yD.gif",
|
||||
"http://i.imgur.com/qqBl2bm.gif",
|
||||
"http://i.imgur.com/eOJlnwP.gif",
|
||||
"https://45.media.tumblr.com/229ec0458891c4dcd847545c81e760a5/tumblr_mpfy232F4j1rxrpjzo1_r2_500.gif",
|
||||
"https://media.giphy.com/media/KZQlfylo73AMU/giphy.gif",
|
||||
"https://media.giphy.com/media/12hvLuZ7uzvCvK/giphy.gif",
|
||||
"http://gallery1.anivide.com/_full/65030_1382582341.gif",
|
||||
"https://49.media.tumblr.com/8e8a099c4eba22abd3ec0f70fd087cce/tumblr_nxovj9oY861ur1mffo1_500.gif ",
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -39,6 +39,7 @@ namespace NadekoBot.Commands
|
||||
cgb.CreateCommand("copyme")
|
||||
.Alias("cm")
|
||||
.Description("Nadeko starts copying everything you say. Disable with cs")
|
||||
.Parameter("silent")
|
||||
.Do(DoFunc());
|
||||
|
||||
cgb.CreateCommand("cs")
|
||||
|
@ -177,27 +177,25 @@ namespace NadekoBot.Modules {
|
||||
.Do(async e => {
|
||||
var user = e.GetArg("user");
|
||||
if (string.IsNullOrWhiteSpace(user) || !e.Message.MentionedUsers.Any()) return;
|
||||
string[] pats = { "http://i.imgur.com/IiQwK12.gif",
|
||||
"http://i.imgur.com/JCXj8yD.gif",
|
||||
"http://i.imgur.com/qqBl2bm.gif",
|
||||
"http://i.imgur.com/eOJlnwP.gif",
|
||||
"https://45.media.tumblr.com/229ec0458891c4dcd847545c81e760a5/tumblr_mpfy232F4j1rxrpjzo1_r2_500.gif",
|
||||
"https://media.giphy.com/media/KZQlfylo73AMU/giphy.gif",
|
||||
"https://media.giphy.com/media/12hvLuZ7uzvCvK/giphy.gif",
|
||||
"http://gallery1.anivide.com/_full/65030_1382582341.gif",
|
||||
"https://49.media.tumblr.com/8e8a099c4eba22abd3ec0f70fd087cce/tumblr_nxovj9oY861ur1mffo1_500.gif ",
|
||||
};
|
||||
await e.Channel.SendMessage($"{e.Message.MentionedUsers.First().Mention} {pats[rng.Next(0, pats.Length)]}");
|
||||
try {
|
||||
await e.Channel.SendMessage(
|
||||
$"{e.Message.MentionedUsers.First().Mention} " +
|
||||
$"{NadekoBot.Config.PatResponses[rng.Next(0, NadekoBot.Config.PatResponses.Length)]}");
|
||||
} catch {
|
||||
await e.Channel.SendMessage("Error while handling PatResponses check your data/config.json");
|
||||
}
|
||||
});
|
||||
|
||||
cgb.CreateCommand("cry")
|
||||
.Description("Tell Nadeko to cry. You are a heartless monster if you use this command.")
|
||||
.Do(async e => {
|
||||
string[] pats = { "http://i.imgur.com/Xg3i1Qy.gif",
|
||||
"http://i.imgur.com/3K8DRrU.gif",
|
||||
"http://i.imgur.com/k58BcAv.gif",
|
||||
"http://i.imgur.com/I2fLXwo.gif" };
|
||||
await e.Channel.SendMessage($"(•̥́ _•ૅ。)\n{pats[rng.Next(0, pats.Length)]}");
|
||||
try {
|
||||
await
|
||||
e.Channel.SendMessage(
|
||||
$"(•̥́ _•ૅ。)\n{NadekoBot.Config.CryResponses[rng.Next(0, NadekoBot.Config.CryResponses.Length)]}");
|
||||
} catch {
|
||||
await e.Channel.SendMessage("Error while handling CryResponses check your data/config.json");
|
||||
}
|
||||
});
|
||||
|
||||
cgb.CreateCommand("are you real")
|
||||
@ -277,7 +275,7 @@ namespace NadekoBot.Modules {
|
||||
var msgs = (await e.Channel.DownloadMessages(100))
|
||||
.Where(m => m.MentionedUsers.Contains(e.User))
|
||||
.OrderByDescending(m => m.Timestamp);
|
||||
if (msgs.Count() > 0)
|
||||
if (msgs.Any())
|
||||
msg = msgs.First();
|
||||
else {
|
||||
var attempt = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user