Open MadamJazzy opened 4 months ago
Example of how we've accomplished this on a python discord bot. (I'm sure this will be different for vencord not just because its coded in a different language but also because its not a bot) Maybe it will give whoever is willing to create this a better idea of what i'm talking about and how it is accomplished on a normal bot.
@commands.Cog.listener()
async def on_message(self, message):
if isinstance(message.channel, discord.TextChannel):
channel = message.channel
elif isinstance(message.channel, discord.Thread) and isinstance(message.channel.parent, discord.ForumChannel):
channel = message.channel.parent
else:
return
watched_channels = []
watched_users = []
if channel.id in watched_channels and message.author.id in watched_users and message.attachments:
user = self.bot.get_user() # Gets the user to send the notification to
embed = discord.Embed(title=f"{message.author.name} has posted an image in a watched channel")
embed.description = f"Message Link: {message.jump_url}"
await user.send(embed=embed)
Plugin Description
Plug-in that allows a user to enter users ids and channel ids to monitor and get notifications when a user posts in a monitored channel that u selected. Could also call it custom notifications or something like that. It would be nice to have
Could be done rather easily, in bots it would be done by creating a list of watched channel IDs and a list of watched users IDs. And in an On_message listener .. if message.channel.id in watched_channels and message.author.id in watched_users: (etc, ofc this is what i use for a python bot i have developed but it would be much easier to have directly in Vencord.
---How plugin works--- Watches channels in the list of watched channels for message by certain people on the watched users list. Settings could be set to look for any message, but also to look for only messages with attachments for image channels. Upon the conditions set, it would give a notification to the user that has posted a <message/attachment> in .
Existing Plugin for other mod
No response
Request Agreement