.adsarm added, not tested
This commit is contained in:
parent
7a4629c783
commit
83fe5dbce1
@ -20,6 +20,24 @@ namespace NadekoBot.Modules.Administration
|
||||
public class SelfAssignedRolesCommands
|
||||
{
|
||||
|
||||
[NadekoCommand, Usage, Description, Aliases]
|
||||
[RequireContext(ContextType.Guild)]
|
||||
[RequirePermission(GuildPermission.ManageMessages)]
|
||||
public async Task AdSarm(IUserMessage imsg)
|
||||
{
|
||||
var channel = (ITextChannel)imsg.Channel;
|
||||
bool newval;
|
||||
using (var uow = DbHandler.UnitOfWork())
|
||||
{
|
||||
var config = uow.GuildConfigs.For(channel.Guild.Id);
|
||||
newval = config.AutoDeleteSelfAssignedRoleMessages = !config.AutoDeleteSelfAssignedRoleMessages;
|
||||
await uow.CompleteAsync().ConfigureAwait(false);
|
||||
}
|
||||
|
||||
await channel.SendMessageAsync($"Automatic deleting of `iam` and `iamn` confirmations has been {(newval ? "enabled" : "disabled")}.")
|
||||
.ConfigureAwait(false);
|
||||
}
|
||||
|
||||
[NadekoCommand, Usage, Description, Aliases]
|
||||
[RequireContext(ContextType.Guild)]
|
||||
[RequirePermission(GuildPermission.ManageRoles)]
|
||||
|
1287
src/NadekoBot/Resources/CommandStrings.Designer.cs
generated
1287
src/NadekoBot/Resources/CommandStrings.Designer.cs
generated
File diff suppressed because it is too large
Load Diff
@ -2466,4 +2466,13 @@
|
||||
<data name="setmuterole_usage" xml:space="preserve">
|
||||
<value>`{0}setmuterole Silenced`</value>
|
||||
</data>
|
||||
</root>
|
||||
<data name="adsarm_cmd" xml:space="preserve">
|
||||
<value>adsarm</value>
|
||||
</data>
|
||||
<data name="adsarm_desc" xml:space="preserve">
|
||||
<value>Toggles the automatic deletion of confirmations for {0}iam and {0}iamn commands.</value>
|
||||
</data>
|
||||
<data name="adsarm_usage" xml:space="preserve">
|
||||
<value>`{0}adsarm`</value>
|
||||
</data>
|
||||
</root>
|
Loading…
Reference in New Issue
Block a user