Skip to content

Commit

Permalink
Fixed a check for rule reaction
Browse files Browse the repository at this point in the history
Updated some message outputs for the command `setuprulesmessage`
Updated the command `setuprulesmessage`'s summary
  • Loading branch information
Voltstro committed Jan 1, 2020
1 parent f05e41b commit 3517547
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
3 changes: 1 addition & 2 deletions src/Pootis-Bot/Events/ChannelEvents.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ public async Task ChannelDestroyed(SocketChannel channel)
BotCheckServerSettings.CheckServerActiveVoiceChannels(server);

//Check the bot's rule message channel
//TODO: When you delete a channel, even though its not the channel were the rule message is located, this will still be triggered and disable the rule reaction feature
//await BotCheckServerSettings.CheckServerRuleMessageChannel(server);
await BotCheckServerSettings.CheckServerRuleMessageChannel(server);
}
}
}
9 changes: 5 additions & 4 deletions src/Pootis-Bot/Modules/Server/ServerSetup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ await Context.Channel.SendMessageAsync(
}

[Command("setuprulesmessage")]
[Summary("Sets the rules message by the message id. Needs to be in the same channel with the message!")]
[Summary("Sets the message that needs to be reacted to. You need to run the command in the same channel were the message is located!")]
[Alias("setup rules message")]
[RequireGuildOwner]
public async Task SetupRuleMessage(ulong id = 0)
Expand All @@ -169,21 +169,22 @@ public async Task SetupRuleMessage(ulong id = 0)
{
ServerList server = ServerListsManager.GetServer(Context.Guild);
server.RuleMessageId = id;
server.RuleMessageChannelId = Context.Channel.Id;

ServerListsManager.SaveServerList();

await Context.Channel.SendMessageAsync(
$"The rule message was set to the message with the id of **{id}**.");
$"The rule message was set to the message with the ID of **{id}**.");
}
else
{
await Context.Channel.SendMessageAsync(
"That message doesn't exist! Make sure you are in the same channel as were that message is located.");
"Cannot find a message with that ID! Make sure you are in the same channel were the message is located.");
}
}
else
{
await Context.Channel.SendMessageAsync("The rules message was disabled");
await Context.Channel.SendMessageAsync("The rules message was disabled.");
ServerList server = ServerListsManager.GetServer(Context.Guild);
server.RuleMessageId = 0;

Expand Down

0 comments on commit 3517547

Please sign in to comment.