mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-08 23:07:54 +00:00
Sanitize more inputs
This commit is contained in:
parent
1988b29fbc
commit
83c709b69d
9 changed files with 37 additions and 37 deletions
|
|
@ -59,7 +59,7 @@ namespace PluralKit.Bot.Commands {
|
|||
public async Task PermCheckGuild(Context ctx)
|
||||
{
|
||||
var guildIdStr = ctx.PopArgument() ?? throw new PKSyntaxError("You must pass a server ID.");
|
||||
if (!ulong.TryParse(guildIdStr, out var guildId)) throw new PKSyntaxError($"Could not parse `{guildIdStr}` as an ID.");
|
||||
if (!ulong.TryParse(guildIdStr, out var guildId)) throw new PKSyntaxError($"Could not parse `{guildIdStr.SanitizeMentions()}` as an ID.");
|
||||
|
||||
// TODO: will this call break for sharding if you try to request a guild on a different bot instance?
|
||||
var guild = ctx.Client.GetGuild(guildId) as IGuild;
|
||||
|
|
@ -97,7 +97,7 @@ namespace PluralKit.Bot.Commands {
|
|||
|
||||
// Generate the output embed
|
||||
var eb = new EmbedBuilder()
|
||||
.WithTitle($"Permission check for **{guild.Name}**");
|
||||
.WithTitle($"Permission check for **{guild.Name.SanitizeMentions()}**");
|
||||
|
||||
if (permissionsMissing.Count == 0)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue