Added .crinv command

This commit is contained in:
Kwoth
2017-01-07 16:33:37 +01:00
parent 04ad50ada8
commit 0425c52332
4 changed files with 48 additions and 1 deletions

View File

@@ -251,6 +251,17 @@ namespace NadekoBot.Modules.Utility
await channel.SendConfirmAsync("Channel topic", topic);
}
[NadekoCommand, Usage, Description, Aliases]
[RequireContext(ContextType.Guild)]
[RequireBotPermission(ChannelPermission.CreateInstantInvite)]
[RequireUserPermission(ChannelPermission.CreateInstantInvite)]
public async Task CreateInvite()
{
var invite = await ((ITextChannel)Context.Channel).CreateInviteAsync(0, null, isUnique: true);
await Context.Channel.SendConfirmAsync($"{Context.User.Mention} https://discord.gg/{invite.Code}");
}
[NadekoCommand, Usage, Description, Aliases]
public async Task Stats()
{