Skip to content

Instantly share code, notes, and snippets.

View ImJoosan's full-sized avatar

Joosan ImJoosan

View GitHub Profile
@Quahu
Quahu / purge.cs
Created June 2, 2018 16:52
An example purge command that removes messages from the channel it's used in.
[Command("purge")]
[Alias("clean")]
[Summary("Downloads and removes X messages from the current channel.")]
[RequireUserPermission(ChannelPermission.ManageMessages)]
[RequireBotPermission(ChannelPermission.ManageMessages)]
public async Task PurgeAsync(int amount)
{
// Check if the amount provided by the user is positive.
if (amount <= 0)
{