You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
awaite.Channel.SendMessageAsync(newDiscordMessageBuilder().WithContent($"{cfgjson.Emoji.Error}{e.User.Mention}, this action has already been completed!").WithReply(e.Message.Id));
77
+
78
+
// Remove buttons from original message so this doesn't happen again
// This is really cursed, but it effectively converts our mock DiscordOverwrite into an actual one so that it can be added to the current list of overwrites.
92
+
// Since the mock overwrite serializes into the same format as a DiscordOverwrite, we can serialize it and then deserialize it back to DiscordOverwrite to convert it.
.WithContent($"{cfgjson.Emoji.Warning} **Caution:** This user already has an override for <#{channelId}>! Do you want to merge the permissions? Here are their **current** permissions:\n**Allowed:** {overwrites[channelId.ToString()].Allowed}\n**Denied:** {overwrites[channelId.ToString()].Denied}")
// Remove from db so the override is not added again
128
+
overridesPendingAddition.Remove(e.Message.Id);
129
+
130
+
// Respond
131
+
awaite.Message.ModifyAsync(newDiscordMessageBuilder().WithContent($"{cfgjson.Emoji.Success} Successfully added the following override for <@{newOverwrite.Id}> to <#{pendingOverride.ChannelId}>!\n**Allowed:** {newOverwrite.Allowed}\n**Denied:** {newOverwrite.Denied}"));
awaite.Channel.SendMessageAsync(newDiscordMessageBuilder().WithContent($"{cfgjson.Emoji.Error}{e.User.Mention}, this action has already been completed!").WithReply(e.Message.Id));
141
+
142
+
// Remove buttons from original message so this doesn't happen again
awaite.Channel.SendMessageAsync(newDiscordMessageBuilder().WithContent($"{cfgjson.Emoji.Error}{e.User.Mention}, this action has already been completed!").WithReply(e.Message.Id));
164
+
165
+
// Remove buttons from original message so this doesn't happen again
awaite.Message.ModifyAsync(newDiscordMessageBuilder().WithContent($"{cfgjson.Emoji.Success} Override successfully added. <@{newOverwrite.Id}> already had an override in <#{pendingOverride.ChannelId}>, so here are their new permissions:\n**Allowed:** {newOverwrite.Allowed}\n**Denied:** {newOverwrite.Denied}"));
202
+
}
69
203
else
70
204
{
71
205
awaite.Interaction.CreateResponseAsync(DiscordInteractionResponseType.ChannelMessageWithSource,newDiscordInteractionResponseBuilder().WithContent("Unknown interaction. I don't know what you are asking me for.").AsEphemeral(true));
0 commit comments