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

@ -1 +1 @@
Subproject commit fa2568bc312ba35f1518e47601c62fccdb949731
Subproject commit b9f767337d2b7c07ed76eb83c3bc5030109d5238

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()
{

View File

@ -1841,6 +1841,33 @@ namespace NadekoBot.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to createinvite crinv.
/// </summary>
public static string createinvite_cmd {
get {
return ResourceManager.GetString("createinvite_cmd", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Creates a new invite which has infinite max uses and never expires..
/// </summary>
public static string createinvite_desc {
get {
return ResourceManager.GetString("createinvite_desc", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to `{0}crinv`.
/// </summary>
public static string createinvite_usage {
get {
return ResourceManager.GetString("createinvite_usage", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to createrole cr.
/// </summary>

View File

@ -2871,4 +2871,13 @@
<data name="rotaterolecolor_usage" xml:space="preserve">
<value>`{0}rrc 60 MyLsdRole #ff0000 #00ff00 #0000ff` or `{0}rrc 0 MyLsdRole`</value>
</data>
<data name="createinvite_cmd" xml:space="preserve">
<value>createinvite crinv</value>
</data>
<data name="createinvite_desc" xml:space="preserve">
<value>Creates a new invite which has infinite max uses and never expires.</value>
</data>
<data name="createinvite_usage" xml:space="preserve">
<value>`{0}crinv`</value>
</data>
</root>