Heptorion
Heptorion
def is_sykman(ctx):
return ctx.message.author.id == 472800795591442443
@bot.event
async def on_ready():
print(f"Ready (commands {bot.user.name}) !")
await bot.change_presence(activity = discord.Activity(type =
discord.ActivityType.watching, name = ".help"))
@bot.event
async def on_message(message):
if message.author == bot.user:
return
if isinstance(message.channel, discord.DMChannel):
if message.content.startswith("."):
return
else:
channel = bot.get_channel(833307282573885470)
await channel.send(f':flag_gb: {message.author.mention} sent me
the message: "{message.content}".\n:flag_fr: {message.author.mention} m\'a envoyé
le message: "{message.content}".')
print(f'{message.author.name} sent me the message:
"{message.content}".')
await message.author.send(':flag_gb: Your message has been sent
to the staff of the ``HĖPŦØRIØN``\'s server.\n:flag_fr: Votre message a bien été
envoyé au personnel du serveur d\'``HĖPŦØRIØN``.')
return
await bot.process_commands(message)
@bot.event
async def on_command_error(ctx, error):
if isinstance(error, commands.MissingRequiredArgument):
await ctx.send(":flag_gb: A required argumant is missing.\n:flag_fr: Un
argumant nécessaire est manquant...")
print(f'{ctx.author.name} tried to use a command but forget an
argument...')
await delete_messages(ctx, 1, 3)
@bot.event
async def on_raw_reaction_add(payload):
message_id = payload.message_id
member = payload.member
guild_id = payload.guild_id
guild = discord.utils.find(lambda g: g.id == guild_id, bot.guilds)
if message_id == 975845483299876925:
if payload.emoji.name == '✅':
role = discord.utils.get(guild.roles, id = 825342255963308052)
await reaction_add(member, role)
else:
role = discord.utils.get(guild.roles, name = payload.emoji.name)
await reaction_add(member, role)
await member_ticket.edit(category =
discord.utils.get(guild.channels, id = 829972188416311316))
await member_ticket.set_permissions(member, view_channel = True)
await member_ticket.set_permissions(everyone_role, view_channel =
False)
ticket_panel = await
ticket_pannel_channel.fetch_message(975847067282989146)
await ticket_panel.remove_reaction("📩", member)
ticket_logs_channel = bot.get_channel(975847613146476574)
embed = discord.Embed(title = f"**This user created a ticket:**",
description = f"<@{member.id}>", inline = False, color = 0xffffff)
await ticket_logs_channel.send(embed = embed)
await asyncio.sleep(10)
await messages_to_delete.delete()
@bot.event
async def on_raw_reaction_remove(payload):
message_id = payload.message_id
member = await(await
bot.fetch_guild(payload.guild_id)).fetch_member(payload.user_id)
guild_id = payload.guild_id
guild = discord.utils.find(lambda g: g.id == guild_id, bot.guilds)
if message_id == 976010345799893003:
if payload.emoji.name == '🇬🇧':
role = discord.utils.get(guild.roles, id = 825342256730865674)
await reaction_remove(member, role)
elif payload.emoji.name == '🇫🇷':
role = discord.utils.get(guild.roles, id = 825342257540366336)
await reaction_remove(member, role)
elif payload.emoji.name == '🇪🇸':
role = discord.utils.get(guild.roles, id = 825342257904615476)
await reaction_remove(member, role)
@bot.event
async def on_voice_state_update(member, before, after):
notifs_channel = bot.get_channel(975741281366077540)
if after.channel is not None and after.channel.id == 933657767317741618:
guild = bot.get_guild(825341656567513098)
everyone_role = discord.utils.get(guild.roles, id = 825341656567513098)
community_role = discord.utils.get(guild.roles, id =
825342255963308052)
muted_role = discord.utils.get(guild.roles, id = 833017692322529370)
global member_channel
member_channel = await guild.create_voice_channel(name =
f"{member.name}'s channel")
await member_channel.edit(category = discord.utils.get(guild.channels,
id = 825342269124247562))
await member_channel.set_permissions(member, manage_channels = True,
manage_permissions = True, priority_speaker = True, move_members = True)
await member_channel.set_permissions(everyone_role, connect = False)
await member_channel.set_permissions(community_role, connect = True)
await member_channel.set_permissions(muted_role, speak = False)
await member.move_to(member_channel)
print(f"{member.name} created a temporary voice channel.")
@bot.command()
async def help(ctx, language = "fr"):
if language == "en":
await ctx.send(":flag_gb: The english version of the help command is
not made at the moment, so instead use the help fr command !")
elif language == "fr":
buttons = [create_button(style = ButtonStyle.blue, label = "Commandes
amusantes", custom_id = "fun"), create_button(style = ButtonStyle.blue, label =
"Commandes modération (personnel seulement)", custom_id = "mod"),
create_button(style = ButtonStyle.blue, label = "Autre", custom_id = "oth")]
action_row = create_actionrow(*buttons)
help_embed = discord.Embed(title = "**Pour quel type de commandes avez-
vous besoin d'aide ?**", description = "", inline = False, color = 0xfdfdfd)
def check(m):
return m.author_id == ctx.author.id and m.origin_message.id ==
help.id
try:
while True:
button_ctx = await wait_for_component(bot, components =
action_row, check = check)
if button_ctx.custom_id == "fun":
await button_ctx.edit_origin(embed = fun_embed)
elif button_ctx.custom_id == "mod":
await button_ctx.edit_origin(embed = mod_embed)
elif button_ctx.custom_id == "oth":
await button_ctx.edit_origin(embed = oth_embed)
except:
pass
@bot.command()
async def ping(ctx):
if round(bot.latency * 1000) < 50:
await ctx.send(f"🟢 ``{round(bot.latency * 1000)}``ms")
elif round(bot.latency * 1000) > 50 and round(bot.latency * 1000) < 150:
await ctx.send(f"🟡 ``{round(bot.latency * 1000)}``ms")
else:
await ctx.send(f"🔴 ``{round(bot.latency * 1000)}``ms")
@bot.command()
async def edit(ctx, msg_id: int = None, *, content):
await delete_messages(ctx)
channel = ctx.channel
msg = await channel.fetch_message(msg_id)
await msg.edit(content = content)
@bot.command()
async def addreaction(ctx, msg_id: int = None, reaction = None):
await delete_messages(ctx)
channel = ctx.channel
msg = await channel.fetch_message(msg_id)
await msg.add_reaction(reaction)
@bot.command()
async def say(ctx, *, content):
await delete_messages(ctx)
await ctx.send(f'||(by {ctx.author.mention})||\n{content}')
print(f'{ctx.author.name} used the command "say", and made me say:
"{content}".')
@bot.command()
@commands.has_permissions(kick_members = True)
async def kick(ctx, member: discord.Member, *, reason = "No reason was provided"):
if member == ctx.author or member == bot.user:
embed = discord.Embed(title = "**You can not kick me or yourself!**",
description = "", inline = False, color = 0xffffff)
await ctx.send(embed = embed)
else:
embed = discord.Embed(title = "**KICKED USER**", description = "",
inline = False, color = 0xff0000)
embed.set_thumbnail(url =
"https://discordemoji.com/assets/emoji/BanneHammer.png")
embed.add_field(name = "Kicked user:", value = member.name, inline =
True)
embed.add_field(name = "Reason:", value = reason, inline = True)
embed.add_field(name = "Moderator:", value = ctx.author.name, inline =
True)
await ctx.send(embed = embed)
await member.send(f'You was kicked by {ctx.author.name} for the reason:
"{reason}".')
await ctx.guild.kick(member, reason = (f'{member.name} was kicked from
the server by {ctx.author.name} for the reason: "{reason}".'))
print(f'{member.name} was kicked from the server by {ctx.author.name}
for the reason: "{reason}".')
@bot.command()
@commands.has_permissions(ban_members = True)
async def ban(ctx, member: discord.Member, *, reason = "No reason was provided"):
if member == ctx.author or member == bot.user:
embed = discord.Embed(title = "**You can not ban me or yourself!**",
description = "", inline = False, color = 0xffffff)
await ctx.send(embed = embed)
else:
embed = discord.Embed(title = "**BANNED USER**", description = "",
inline = False, color = 0xff0000)
embed.set_thumbnail(url =
"https://discordemoji.com/assets/emoji/BanneHammer.png")
embed.add_field(name = "Banned user:", value = member.name, inline =
True)
embed.add_field(name = "Reason:", value = reason, inline = True)
embed.add_field(name = "Moderator:", value = ctx.author.name, inline =
True)
await ctx.send(embed = embed)
await member.send(f'You was banned by {ctx.author.name} for the reason:
"{reason}".')
await ctx.guild.ban(member, reason = f'{member.name} was banned from
the server by {ctx.author.name} for the reason: "{reason}".')
print(f'{member.name} was banned from the server by {ctx.author.name}
for the reason: "{reason}".')
@bot.command()
@commands.has_permissions(ban_members = True)
async def unban(ctx, user):
user_name, user_discriminator = user.split("#")
banned_users = await ctx.guild.bans()
for i in banned_users:
if i.user.name == user_name and i.user.discriminator ==
user_discriminator:
await ctx.guild.unban(i.user)
embed = discord.Embed(title = "**UNBANNED USER**", description =
"", inline = False, color = 0x0fff00)
embed.add_field(name = "Unbanned user:", value = f"{user.name}
{user_discriminator}", inline = True)
embed.add_field(name = "Moderator:", value = ctx.author.name,
inline = True)
await ctx.send(embed = embed)
return
await ctx.send(f"{user} is not banned.")
@bot.command()
@commands.has_permissions(manage_messages = True)
async def tempmute(ctx, member:discord.Member, origin_duration: int = 1, unit =
"h", *, reason = "No reason was provided"):
if member == ctx.author or member == bot.user:
embed = discord.Embed(title = "**You can not temporarily mute me or
yourself!**", description = "", inline = False, color = 0xffffff)
await ctx.send(embed = embed)
else:
if unit == "min":
seconds_duration = origin_duration * 60
await tempmute_function(ctx, member, origin_duration, reason,
seconds_duration, unit)
@bot.command()
@commands.has_permissions(manage_messages = True)
async def mute(ctx, member: discord.Member, *, reason = "No reason was provided"):
if member == ctx.author or member == bot.user:
embed = discord.Embed(title = "**You can not mute me or yourself!**",
description = "", inline = False, color = 0xffffff)
await ctx.send(embed = embed)
else:
muted_role = discord.utils.get(ctx.guild.roles, id =
833017692322529370)
await member.add_roles(muted_role, reason = f'{member.name} was muted
from the server by {ctx.author.name} for the reason: "{reason}".')
embed = discord.Embed(title = "**MUTED USER**", description = "",
inline = False, color = 0xff0000)
embed.set_thumbnail(url =
"https://discordemoji.com/assets/emoji/BanneHammer.png")
embed.add_field(name = "Muted user:", value = member.name, inline =
True)
embed.add_field(name = "Reason:", value = reason, inline = True)
embed.add_field(name = "Moderator:", value = ctx.author.name, inline =
False)
await ctx.send(embed = embed)
@bot.command()
@commands.has_permissions(manage_messages = True)
async def unmute(ctx, member: discord.Member):
muted_role = discord.utils.get(ctx.guild.roles, id = 833017692322529370)
await member.remove_roles(muted_role)
embed = discord.Embed(title = "**UNMUTED USER**", description = "", inline =
False, color = 0x0fff00)
embed.add_field(name = "Unmuted user:", value = member.name, inline = True)
embed.add_field(name = "Moderator:", value = ctx.author.name, inline = True)
await ctx.send(embed = embed)
print(f"{member.name} was unmuted from the server by {ctx.author.name}.")
@bot.command()
async def noice(ctx):
await delete_messages(ctx)
await ctx.send(f'||(by {ctx.author.mention})||\nhttps://tenor.com/view/noice-
nice-click-gif-8843762')
@bot.command()
@commands.check(is_sykman)
async def shutdown(ctx):
message = await ctx.send("I am shutting myself down:sleeping:")
await message.add_reaction("👋")
print("----------------------------------------------------\nJe suis en train
de m'éteindre !")
channel = bot.get_channel(825342303722930176)
message_to_delete = await channel.send('**I will get offline in 15 seconds,
good bye:wave: !**')
await message_to_delete.add_reaction("👋")
asyncio.sleep(15)
await message_to_delete.delete()
await ctx.bot.logout()
@bot.command()
@commands.has_permissions(administrator = True)
async def vote(ctx, *, vote_content):
await delete_messages(ctx)
vote_message = await ctx.send(vote_content)
await vote_message.add_reaction("✅")
await vote_message.add_reaction("🤷")
await vote_message.add_reaction("❌")
print(f'{ctx.author.name} used the command "vote" on "{vote_content}".')
@bot.command()
@commands.has_permissions(administrator = True)
async def adminvote(ctx, *, vote_content):
await delete_messages(ctx)
vote_message = await ctx.send(vote_content + "\n\n__***(@everyone, pour une
question d'organisation, veuillez tous voter et ne mettre qu'un seul vote)***__")
await vote_message.add_reaction("✅")
await vote_message.add_reaction("🤷")
await vote_message.add_reaction("❌")
print(f'{ctx.author.name} used the command "adminvote" on "{vote_content}".')
@bot.command()
async def issou(ctx):
await delete_messages(ctx)
await ctx.send(f"||(by {ctx.author.mention})||\nhttps://tenor.com/view/issou-
gif-7315327")
@bot.command()
async def ok(ctx):
await delete_messages(ctx)
await ctx.send(f"||(by {ctx.author.mention})||\nhttps://tenor.com/view/ok-
okay-awkward-smile-gif-5307535")
@bot.command()
async def reportuser(ctx, member: discord.Member, *, reason):
if member.mention == ctx.author.mention:
await ctx.send("You can not report yourself !")
else:
await ctx.send(f'{member.mention} has been reported for the reason:
**"{reason}"**.')
channel = bot.get_channel(825754706063261776)
await channel.send(f'{member.mention} has been reported by
{ctx.author.mention} for the reason: **"{reason}"**.')
@bot.command()
async def reportbug(ctx, *, bug):
await ctx.send(f'You have reported the bug: **"{bug}"**.')
channel = bot.get_channel(825754706063261776)
await channel.send(f'{ctx.author.mention} has reported the bug:
**"{bug}"**.')
@bot.command(name = "..")
async def _ignoring_triple_dot_message(ctx):
return
@bot.command(name = ".")
async def _ignoring_double_dot_messagee(ctx):
return
@bot.command()
async def userinfo(ctx, member: discord.Member):
if member.id == 472800795591442443:
sykman_embed_en = discord.Embed(title = f"**{member.name}'s
informations:**", description = "", inline = False, color = 0xfdfdfd)
sykman_embed_en.set_thumbnail(url = member.avatar_url)
sykman_embed_en.add_field(name = "Pseudonym:", value =
f"{member.name}#{member.discriminator}", inline = True)
sykman_embed_en.add_field(name = "Date of birth (MM/DD/YYYY) and age:",
value = "08/22/2006, 15 years old", inline = True)
sykman_embed_en.add_field(name = "Biography:", value = f'Born on August
22 2006 on the South of the France, {member.name}, whose real name is Mathis,
wanted to become a professional player on Counter-Strike: Global Offensive at the
age of 13, before understanding that it was really difficult and choosing a second
plan "in case", and choosing to become a programmer. He is one of the founders of
group HĖPŦØRIØN, of which he is a programer. In HĖPŦØRIØN, he takes care of
developing HĖPŦØRIØN\'s BOT, and the game we are creating. You can find him on:\n``
— Twitch (__Sykman)``\n``— YouTube (Sykman)``\n``— Twitter (@Sykman_)``', inline =
False)
await ctx.send(":flag_gb:")
await ctx.send(embed = sykman_embed_en)
else:
await ctx.send(":flag_gb: Sorry but informations of the user you are
trying to search for are unknown.\n:flag_fr: Désolé mais les informations de
l'utilisateur que vous essayez de chercher sont inconnus.")
@bot.command()
async def serverinfo(ctx):
server_embed_en = discord.Embed(title = "**Discord server's informations:**",
description = "", inline = False, color = 0xfdfdfd)
server_embed_en.set_thumbnail(url = ctx.guild.icon_url)
server_embed_en.add_field(name = "Pseudonym:", value = "HĖPŦØRIØN", inline =
False)
server_embed_en.add_field(name = "Date of birth (MM/DD/YYYY) and age:", value
= "03/27/2021, 1 years old", inline = False)
#server_embed_en.add_field(name = "Biography", value = "", inline = False)
await ctx.send(":flag_gb:")
await ctx.send(embed = server_embed_en)
@bot.command()
async def botinfo(ctx):
embed = discord.Embed(title = "**ℹ BOT INFORMATION ℹ**", description = "",
inline = False, color = 0xfdfdfd)
embed.add_field(name = "**Programer/Owner:**", value = "Sykman#2824", inline
= True)
embed.add_field(name = "Bot version:", value = "4.5", inline = True)
embed.add_field(name = "**Date of creation (MM/DD/YYYY):**", value =
"02/14/2021", inline = True)
await ctx.send(embed = embed)
@bot.command()
@commands.has_permissions(administrator = True)
async def rules(ctx):
rules_embed_en = discord.Embed(title = "**REGULATION**", description = "",
inline = False, color = 0xfdfdfd)
rules_embed_en.set_thumbnail(url =
"https://upload.wikimedia.org/wikipedia/commons/thumb/a/ae/Flag_of_the_United_Kingd
om.svg/langfr-225px-Flag_of_the_United_Kingdom.svg.png")
rules_embed_en.add_field(name = "**__I - GENERALLY:__**", value = "Insults
prohibited.\n\nPornographic content prohibited.\n\nRacist content prohibited.\n\nIt
is forbidden to express oneself on one’s religion or beliefs (to avoid all forms of
racism).\n\nSexist content prohibited.\n\nHomophobic content prohibited.\n\nMutual
respect mandatory.\n\nThreatening content prohibited.\n\nDiscrimination (=unequal
treatment depending on the person) prohibited.\n\nSpams prohibited.", inline =
False)
rules_embed_en.add_field(name = "**__II - TEXT CHANNELS:__**", value = "All
suspicious links, unknown or dangerous are prohibited.\n\nThe advertising is
prohibited unless authorized by a staff member.", inline = False)
rules_embed_en.add_field(name = "**__III - VOICE CHANNELS:__**", value =
"Excessive changes in voice channels are prohibited.", inline = False)
rules_embed_en.add_field(name = "**__IV - OTHER:__**", value = "Identity
theft (pseudo theft is part of it) prohibited.\n\nIt is forbidden to leave the
server to escape a sanction under penalty of being temporarily banned for twice the
duration of the departure sanction.", inline = False)
@bot.command()
@commands.check(is_sykman)
async def getmsgcontentpython(ctx, msg_id):
await delete_messages(ctx)
message = await ctx.channel.fetch_message(msg_id)
message_to_print = message.content.replace('\n', r'\n')
print(f"Voici le contenu du message que vous avez selectionné:\
n----------------------------------------------------\n{message_to_print}\
n----------------------------------------------------")
@bot.command()
@commands.check(is_sykman)
async def getmsgcontentdiscord(ctx, msg_id):
await delete_messages(ctx)
message = await ctx.channel.fetch_message(msg_id)
print(f"Voici le contenu du message que vous avez selectionné:\
n----------------------------------------------------\n{message.content}\
n----------------------------------------------------")
bot.run("")