A typeguard to check if the received message is from inside a guild.
I'm currently using the
Based off of the util functions from API Types. I wanted to check if the message is from a guild or not using a typeguard. Rather than checking if both
After reading the docs. I realized the
So I made this just like the
Idk if this actually exists and I missed it or if this is redundant in usage.
But I just thought it'd be nice. Any thoughts are welcome
@discordjs/core package along with it's other subpackages and discord-api-types for my bot. Based off of the util functions from API Types. I wanted to check if the message is from a guild or not using a typeguard. Rather than checking if both
guild_id and member properties exist using if functions everytime. After reading the docs. I realized the
guild_id property only exists when the message is from a guild. (obviously)So I made this just like the
isGuildInteraction typeguard.Idk if this actually exists and I missed it or if this is redundant in usage.
But I just thought it'd be nice. Any thoughts are welcome


