-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sherpmail #88
base: master
Are you sure you want to change the base?
Sherpmail #88
Conversation
* fix: votedelete and starboard works on uncached messages
I saw an issue Ian raised about wanting a way to (a) communicate to the server through the bot (b) have the server communicate to him through the bot and the idea seemed funny so I coded it - there's little error handling, no accounting for excess characters, no graphics and attachment handling, and definitely no spam prevention - however I am sleep deprived and wanted to make what is basically a letter mail system work to a reasonable extent.
OMG MERGE MERGE MERGE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good for the most part, have you tested this on yourself?
cogs/sherpmail.py
Outdated
|
||
@commands.Cog.listener() | ||
async def on_message(self, message: discord.Message): | ||
if (message.guild == None) and (message.author.id == 214657501193306112): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (message.guild == None) and (message.author.id == 214657501193306112): | |
if (message.channel.type === 'dm') and (message.author.id == 214657501193306112): |
I think this is clearer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adjusted to message.channel.type.name == "private"
and it will reflect on the next commit.
cogs/sherpmail.py
Outdated
self.sherp = await interaction.client.fetch_user(212613981465083906) | ||
try: | ||
embed = discord.Embed( | ||
title = f"📬 You've got mail! **@{interaction.user} | ID: {interaction.user.id}** sent you the following:", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems incorrect, unless discord.py has some special __repr__
stuff I'm ignorning. I think we should mention interaction.user.global_name and interaction.user.name. The numeric ID isn't too useful IDT.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The unique UID and user would prevent someone from writing stupid things as they would know that their identifiers were also being sent to Sherp. I did rewrite it and have it stated in the footer of the embed instead.
cogs/sherpmail.py
Outdated
# Nonetheless it is nearly 6am and I felt the need to complete this | ||
# I hope it works out and nobody abuses it lol good luck | ||
|
||
class sherpMailbox(commands.Cog): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
class sherpMailbox(commands.Cog): | |
class SherpMailbox(commands.Cog): |
(style)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call! Applied to the incoming commit.
Modified sherpmail cog from a cosmetic perspective based on inputs from Matt; added sherpmail cog to init file for setup and consistency
Are you sure u want this? Could result in a lot of spam which you may not even be able to block (afaik) |
I do believe you can restrict specific application commands to specific channels - you can create a designated channel and set an extended slow mode timer on that chat which impacts individual users. Additionally, Ian can block and/or mute DMs and it would be as if the bot was never texting him in the first place. |
I saw an issue Ian raised about wanting a way to (a) communicate to the server through the bot (b) have the server communicate to him through the bot; the idea seemed funny enough so I coded it - there's little error handling, no accounting for excess characters, no graphics and attachment handling, and definitely no spam prevention - however I am sleep deprived and wanted to make what is basically a letter mail system work to a reasonable extent.
I have never split PRs in my life I don't know what I did but I hope this is right lol