From b98929224e0e59a9d5ca30bebfd50eda199eb3f9 Mon Sep 17 00:00:00 2001 From: Mohit Singh Sinsniwal Date: Wed, 3 May 2023 11:58:21 +0530 Subject: [PATCH] Changed Verification Email Template --- cogs/Message.py | 13 +- email_template.txt | 549 +++++++++++++++++++++++++++++++++++++++------ embeds.py | 18 ++ 3 files changed, 514 insertions(+), 66 deletions(-) create mode 100644 embeds.py diff --git a/cogs/Message.py b/cogs/Message.py index 4f74578..7f8e004 100644 --- a/cogs/Message.py +++ b/cogs/Message.py @@ -1,6 +1,7 @@ import discord from discord.ext import commands - +from datetime import datetime +from embeds import verification_embed_dm class Menu(discord.ui.View): """ A Discord UI view that displays a menu for EMAIL VERIFICATION. @@ -18,6 +19,8 @@ class Message(commands.Cog): def __init__(self,client): self.client=client + + @commands.Cog.listener() async def on_message(self,message: discord.Message): """ @@ -29,8 +32,9 @@ async def on_message(self,message: discord.Message): if message.content[0:7] == '^create': await message.channel.send("Join our exclusive community and gain access to private channels and premium content by verifying your email address. Click the button below to complete the process and unlock all the benefits of being a part of our server.", view=Menu()) - - + elif message.content[0:5] =="^send": + embed=verification_embed_dm() + await message.author.send(embed=embed) # When somes verfies there email address by clicking the verification link, the email # verification script sends a message to the server in the format: user_id|roll|old_user elif message.author.id == 1078142811725123594: # ID of ServerBot @@ -72,6 +76,9 @@ async def on_message(self,message: discord.Message): await mem.remove_roles(role) await mem.add_roles(Qualifier) # Qualifier + # Send DM to the user + embed = verification_embed_dm() + await user.send(embed=embed) async def setup(client): await client.add_cog(Message(client)) \ No newline at end of file diff --git a/email_template.txt b/email_template.txt index b9a22a3..8b7fe9f 100644 --- a/email_template.txt +++ b/email_template.txt @@ -4,70 +4,493 @@ Discord Verification - - - -
-

Access Private Channels - Verify Your Account on IITM Discord

-

Hello {name},

-

Thank you for joining the IITM Discord Server, the ultimate destination for students to connect, collaborate, and exchange ideas with like-minded individuals.

-

To gain access to our private channels and unlock the full range of resources available on our server, please click the button below to verify your account:

-

If you did not request this verification, you can safely ignore this email. Someone else might have typed your email address by mistake.

- Verify my account -

Thank you for your participation in our community.

-

Thanks!
Server Bot Developers

-
+ +
+ +
+ + + + + + +
+ + + + + + +
+ + + + + + +
+
+ + + + + + +
+
+
+
+
+
+ + + + + + +
+ + + + + + +
+ + + + + + +
+
+ + + + + + +
+
+
+
+
+
+ + + + + + +
+ + + + + + +
+ + + + + + + +
+
I'm an image +
+
+ + + + + + +
+
+ + + + + + +
+
+
+
+
+ + + + + + +
+
+
+

+ Access + Private Channels - Verify + Your Account on IITM + Discord +

+
+
+
+ + + + + + +
+
+
+

+ Hello {name},

+

+  

+ +

+ Thank + you for joining the IITM Discord + Server, the ultimate destination + for students to connect, + collaborate, and exchange ideas + with like-minded + individuals.

+

+  

+ +

+ To + gain access to our private + channels and unlock the full + range of resources available on + our server, please click the + button below to verify your + account:

+
+
+
+ + + + + + +
+
+ + + + + + +
+
+
+
+
+
+ + + + + + +
+ + + + + + +
+ + + + + + +
+
+ + + + + + +
+
+
+
+ + + + + + +
+
+ + + + + + +
+
+
+
+ + + + + + +
+
+
+

+ Click + on this Button if you + requested for this + verficaiton. +

+
+
+
+
+
+ + + + + + +
+ + + + + + +
+ + + + + + +
+ +
+ + + + + + +
+
+ + + + + + +
+
+
+
+
+
+ + + + + + +
+ + + + + + +
+ + + + + + +
+
+ + + + + + +
+
+
+
+ + + + + + +
+
I'm an image +
+
+ + + + + + +
+
+ + + + + + +
+
+
+
+
+
+
+
+
\ No newline at end of file diff --git a/embeds.py b/embeds.py new file mode 100644 index 0000000..3292ff9 --- /dev/null +++ b/embeds.py @@ -0,0 +1,18 @@ +import discord +from datetime import datetime + + +def verification_embed_dm(): + embed = discord.Embed(title="Verification Complete - You're In!", + url="https://discord.com/servers/iitm-bs-students-762774569827565569", + description="Optimize Your College Server Experience: Get Your Roles and Access Private Channels Tailored to Your Interests! Update Your Level and Get Your Club Roles and Subject Roles in Corresponding Categories. Gain Access to Private Channels and Engage with Like-minded Peers\n\n> Message from ServerBot\n```\nIf you're familiar with discord.py, you can get the server developer role. Check out my GitHub repo link and send a pull request to enhance my functionality.\n```[Github Repo](https://bit.ly/IITMbot)", + colour=0x00b0f4, + timestamp=datetime.now()) + embed.set_author(name="IITM BS Students", + url="https://discord.com/servers/iitm-bs-students-762774569827565569", + icon_url="https://cdn.discordapp.com/icons/762774569827565569/a_c1c0b26032fa931e5530abd0fbf0b14f.gif?size=128") + + embed.set_image( + url="https://i.ibb.co/mFP3KtR/833070-pxplcgyzbd-1490711385.jpg") + embed.set_footer(text="Have fun ✌️") + return embed