fixed bot mention... api changed >.<
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
using Discord.Modules;
|
||||
using System.Linq;
|
||||
|
||||
namespace NadekoBot.Modules
|
||||
{
|
||||
@ -12,7 +13,34 @@ namespace NadekoBot.Modules
|
||||
{
|
||||
manager.CreateCommands("", cgb =>
|
||||
{
|
||||
commands.ForEach(com => com.Init(cgb));
|
||||
var client = manager.Client;
|
||||
|
||||
commands.ForEach(cmd => cmd.Init(cgb));
|
||||
|
||||
cgb.CreateCommand(".uid")
|
||||
.Description("Shows user id")
|
||||
.Parameter("user",Discord.Commands.ParameterType.Required)
|
||||
.Do(async e =>
|
||||
{
|
||||
if (e.Message.MentionedUsers.Any())
|
||||
await client.SendMessage(e.Channel, "Id of the user " + e.Message.MentionedUsers.First().Mention + " is " + e.Message.MentionedUsers.First().Id);
|
||||
else
|
||||
await client.SendMessage(e.Channel, "You must mention a user.");
|
||||
});
|
||||
|
||||
cgb.CreateCommand(".cid")
|
||||
.Description("Shows current channel id")
|
||||
.Do(async e =>
|
||||
{
|
||||
await client.SendMessage(e.Channel, "This channel's id is " + e.Channel.Id);
|
||||
});
|
||||
|
||||
cgb.CreateCommand(".sid")
|
||||
.Description("Shows current server id")
|
||||
.Do(async e =>
|
||||
{
|
||||
await client.SendMessage(e.Channel, "This server's id is " + e.Server.Id);
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
|
@ -36,6 +36,7 @@ namespace NadekoBot.Modules
|
||||
public override void Install(ModuleManager manager)
|
||||
{
|
||||
Random rng = new Random();
|
||||
|
||||
manager.CreateCommands("", cgb =>
|
||||
{
|
||||
var client = manager.Client;
|
||||
@ -53,7 +54,6 @@ namespace NadekoBot.Modules
|
||||
{
|
||||
await client.SendMessage(e.Channel, Mention.User(e.User) + "\\o\\");
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
manager.CreateCommands(NadekoBot.botMention, cgb =>
|
||||
@ -71,7 +71,7 @@ namespace NadekoBot.Modules
|
||||
else
|
||||
await client.SendMessage(e.Channel, Mention.User(e.User) + ", Don't be silly.");
|
||||
});
|
||||
|
||||
|
||||
CreateCommand(cgb, "die")
|
||||
.Description("Works only for the owner. Shuts the bot down.")
|
||||
.Do(async e =>
|
||||
@ -189,7 +189,6 @@ namespace NadekoBot.Modules
|
||||
string str = "I am online for " + time.Days + " days, " + time.Hours + " hours, and " + time.Minutes + " minutes.";
|
||||
await client.SendMessage(e.Channel, str);
|
||||
});
|
||||
|
||||
CreateCommand(cgb, "fire")
|
||||
.Description("Shows a unicode fire message. Optional parameter [x] tells her how many times to repeat the fire.\nUsage: @NadekoBot fire [x]")
|
||||
.Parameter("times", ParameterType.Optional)
|
||||
@ -469,20 +468,6 @@ namespace NadekoBot.Modules
|
||||
{
|
||||
await client.SendMessage(e.Channel, "Calling " + e.Args[0] + "...");
|
||||
});
|
||||
|
||||
cgb.CreateCommand("cid")
|
||||
.Description("Shows current channel id")
|
||||
.Do(async e =>
|
||||
{
|
||||
await client.SendMessage(e.Channel, "This channel's id is " + e.Channel.Id);
|
||||
});
|
||||
|
||||
cgb.CreateCommand("sid")
|
||||
.Description("Shows current server id")
|
||||
.Do(async e =>
|
||||
{
|
||||
await client.SendMessage(e.Channel, "This server's id is " + e.Server.Id);
|
||||
});
|
||||
CreateCommand(cgb, "hide")
|
||||
.Description("Hides nadeko in plain sight!11!!")
|
||||
.Do(async e =>
|
||||
|
Reference in New Issue
Block a user