minor
This commit is contained in:
parent
d1ca76e097
commit
8ba7a4132f
@ -18,7 +18,7 @@ namespace NadekoBot.Modules {
|
||||
|
||||
public override void Init(CommandGroupBuilder cgb) {
|
||||
cgb.CreateCommand(">poll")
|
||||
.Description("Creates a poll, only person who has manage server permission can do it.\n**Usage**: >poll What is my question?;Answer1;Answer 2; Answer 3")
|
||||
.Description("Creates a poll, only person who has manage server permission can do it.\n**Usage**: >poll Question?;Answer1;Answ 2;A_3")
|
||||
.Parameter("allargs", ParameterType.Unparsed)
|
||||
.Do(e => {
|
||||
if (!e.User.ServerPermissions.ManageChannels)
|
||||
|
@ -35,7 +35,7 @@ namespace NadekoBot.Modules {
|
||||
cgb.CreateCommand(".sr").Alias(".setrole")
|
||||
.Description("Sets a role for a given user.\n**Usage**: .sr @User Guest")
|
||||
.Parameter("user_name", ParameterType.Required)
|
||||
.Parameter("role_name", ParameterType.Required)
|
||||
.Parameter("role_name", ParameterType.Unparsed)
|
||||
.Do(async e => {
|
||||
if (!e.User.ServerPermissions.ManageRoles) return;
|
||||
var usr = e.Server.FindUsers(e.GetArg("user_name")).FirstOrDefault();
|
||||
@ -52,7 +52,7 @@ namespace NadekoBot.Modules {
|
||||
|
||||
try {
|
||||
await usr.AddRoles(new Role[] { role });
|
||||
await e.Send($"Successfully added role **{role.Name}** to user **{usr.Mention}**");
|
||||
await e.Send($"Successfully added role **{role.Name}** to user **{usr.Name}**");
|
||||
} catch (Exception ex) {
|
||||
await e.Send("Failed to add roles. Most likely reason: Insufficient permissions.\n");
|
||||
Console.WriteLine(ex.ToString());
|
||||
@ -79,7 +79,7 @@ namespace NadekoBot.Modules {
|
||||
|
||||
try {
|
||||
await usr.RemoveRoles(new Role[] { role });
|
||||
await e.Send($"Successfully removed role **{role.Name}** from user **{usr.Mention}**");
|
||||
await e.Send($"Successfully removed role **{role.Name}** from user **{usr.Name}**");
|
||||
} catch (InvalidOperationException) {
|
||||
} catch (Exception) {
|
||||
await e.Send("Failed to remove roles. Most likely reason: Insufficient permissions.");
|
||||
@ -106,7 +106,7 @@ namespace NadekoBot.Modules {
|
||||
.Parameter("r", ParameterType.Optional)
|
||||
.Parameter("g", ParameterType.Optional)
|
||||
.Parameter("b", ParameterType.Optional)
|
||||
.Description("Set a role's color to the hex or 0-255 color value provided.\n**Usage*: .color Admin 255 200 100 or .color Admin ffba55")
|
||||
.Description("Set a role's color to the hex or 0-255 color value provided.\n**Usage**: .color Admin 255 200 100 or .color Admin ffba55")
|
||||
.Do(async e => {
|
||||
if (!e.User.ServerPermissions.ManageRoles) {
|
||||
await e.Channel.SendMessage("You don't have permission to use this!");
|
||||
|
@ -31,7 +31,7 @@ namespace NadekoBot.Modules
|
||||
commands.ForEach(cmd => cmd.Init(cgb));
|
||||
|
||||
cgb.CreateCommand(">choose")
|
||||
.Description("Chooses a thing from a list of things\n**Usage**: >choose Get up;Sleep more;Sleep even more")
|
||||
.Description("Chooses a thing from a list of things\n**Usage**: >choose Get up;Sleep;Sleep more")
|
||||
.Parameter("list", Discord.Commands.ParameterType.Unparsed)
|
||||
.Do(async e => {
|
||||
var arg = e.GetArg("list");
|
||||
|
@ -302,7 +302,7 @@ namespace NadekoBot.Modules {
|
||||
cgb.CreateCommand(prefix + "acm").Alias(prefix + "allchannelmodules")
|
||||
.Parameter("bool", ParameterType.Required)
|
||||
.Parameter("channel", ParameterType.Unparsed)
|
||||
.Description("Sets permissions for all modules at the server level.\n**Usage**: ;acm <enable/disable> <channel_name>")
|
||||
.Description("Sets permissions for all modules at the channel level.\n**Usage**: ;acm <enable/disable> <channel_name>")
|
||||
.Do(async e => {
|
||||
try {
|
||||
bool state = PermissionHelper.ValidateBool(e.GetArg("bool"));
|
||||
@ -323,7 +323,7 @@ namespace NadekoBot.Modules {
|
||||
.Parameter("module", ParameterType.Required)
|
||||
.Parameter("bool", ParameterType.Required)
|
||||
.Parameter("channel", ParameterType.Unparsed)
|
||||
.Description("Sets permissions for all commands from a certain module at the server level.\n**Usage**: ;acc <module_name> <enable/disable> <channel_name>")
|
||||
.Description("Sets permissions for all commands from a certain module at the channel level.\n**Usage**: ;acc <module_name> <enable/disable> <channel_name>")
|
||||
.Do(async e => {
|
||||
try {
|
||||
bool state = PermissionHelper.ValidateBool(e.GetArg("bool"));
|
||||
|
Loading…
Reference in New Issue
Block a user