Skip to content

Cleanup specific number of messages #24

Open

Description

@kangalio

It would be useful to specify a number in the ?cleanup, so that Ferris deletes at most that specific number of its messages.

For example, in this Discord discussion, I presented two snippets of code that produces quite verbose compiler output. I wanted to remove just those two long compiler outputs, but preferably not the experiments done above with Ferris. However, the ?cleanup commands wiped all the invocations, even the compact ones above.

Activity

  1. kangalio commented on Feb 1, 2021

    @kangalio
    Author

    I see this has actually supposedly been implemented the entire time. It didn't seem to work though in the linked Discord messages.

    Also, do I understand this code correctly:

    limit = limit or 100
    def is_me(m):
    return m.author.id == self.bot.user.id
    deleted = await ctx.channel.purge(limit=limit, check=is_me)

    This lets anyone delete up to 100 Rust bot messages at once? Without any restrictions? You could theoretically wipe out all of the bot's messages in a channel with this. Is my understanding correct and if yes, is this intended?

  2. kangalio commented on Feb 10, 2021

    @kangalio
    Author

    About ?cleanup in general: as far as I can tell, there is no restrictions on who can use this command, in which channel, to which extent. Any server member could theoretically spam ?cleanup in any channel and eradicate the entire history of Ferris in that channel, if they go long enough. Is that intended behavior?

    • should messages beyond a certain age be exempt from deletion?
    • should users only be able to cleanup Ferris messages triggered by themselves? (except mods)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions