mirror of
https://github.com/TeamOctolings/Octobot.git
synced 2025-05-02 20:19:55 +03:00
fixed a few bugs in settings + code style consistency with string comparison
This commit is contained in:
parent
a06376443f
commit
2493e317d0
8 changed files with 72 additions and 51 deletions
|
@ -20,7 +20,7 @@ public class BanCommand : Command {
|
|||
var author = (SocketGuildUser)context.User;
|
||||
|
||||
var permissionCheckResponse = CommandHandler.HasPermission(ref author, GuildPermission.BanMembers);
|
||||
if (permissionCheckResponse != "") {
|
||||
if (permissionCheckResponse is not "") {
|
||||
Error(permissionCheckResponse, true);
|
||||
return;
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ public class BanCommand : Command {
|
|||
|
||||
if (memberToBan != null) {
|
||||
var interactionCheckResponse = CommandHandler.CanInteract(ref author, ref memberToBan);
|
||||
if (interactionCheckResponse != "") {
|
||||
if (interactionCheckResponse is not "") {
|
||||
Error(interactionCheckResponse, true);
|
||||
return;
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ public class BanCommand : Command {
|
|||
Warn(Messages.DurationParseFailed);
|
||||
reason = Utils.JoinString(ref args, 1);
|
||||
|
||||
if (reason == "") {
|
||||
if (reason is "") {
|
||||
Error(Messages.ReasonRequired, false);
|
||||
return;
|
||||
}
|
||||
|
@ -73,4 +73,4 @@ public class BanCommand : Command {
|
|||
new Task(DelayUnban).Start();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue