ayubun / discord-ttl

A simple-to-selfhost Discord bot that deletes server messages older than a configurable TTL (time to live)
MIT License
34 stars 5 forks source link

Update discord.js & fix channel permissions checks #6

Closed ayubun closed 1 year ago

ayubun commented 1 year ago

TTL currently sends a lot of Missing Access errors from GET requests to the Discord API. This is because I forgot to add a permissions check for VIEW_CHANNEL and READ_MESSAGE_HISTORY:

Screenshot 2023-04-17 at 3 04 36 PM

Alongside adding these checks, this PR also updates the Discord.JS version (which fixes #2) & adds further permissions checks for unique channel cases (such as TiV, which requires CONNECT, on top of VIEW_CHANNEL and READ_MESSAGE_HISTORY)