0% found this document useful (0 votes)
49 views18 pages

Heptorion

This document contains code for a Discord bot that handles various events and commands. The bot can: 1. Delete messages after a specified time. 2. Add and remove roles from members based on their reactions to messages. 3. Create temporary text channels for user tickets and manage the roles and permissions on the channels. 4. Respond to common greetings, direct messages, and errors from invalid commands.

Uploaded by

Goldor
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views18 pages

Heptorion

This document contains code for a Discord bot that handles various events and commands. The bot can: 1. Delete messages after a specified time. 2. Add and remove roles from members based on their reactions to messages. 3. Create temporary text channels for user tickets and manage the roles and permissions on the channels. 4. Respond to common greetings, direct messages, and errors from invalid commands.

Uploaded by

Goldor
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 18

import discord

from discord.ext import commands


import asyncio
from discord_slash import ButtonStyle, SlashCommand
from discord_slash.utils.manage_components import create_button, create_actionrow,
wait_for_component
from random import randrange

bot = commands.Bot(command_prefix = ".", help_command = None)


slash = SlashCommand(bot, sync_commands = True)

def is_sykman(ctx):
return ctx.message.author.id == 472800795591442443

async def delete_messages(ctx, number_of_message_to_delete = 1, time_to_wait = 0):


messages = await ctx.channel.history(limit =
number_of_message_to_delete).flatten()
await asyncio.sleep(time_to_wait)
for message in messages:
await message.delete()

async def reaction_add(member, role):


await member.add_roles(role)
print(f'{member.name} added the reaction and got the role "{role}"!')

async def reaction_remove(member, role):


await member.remove_roles(role)
print(f'{member.name} removed the reaction and lost the role "{role}"!')

async def tempmute_function(ctx, member, origin_duration, reason, seconds_duration,


unit):
muted_role = discord.utils.get(ctx.guild.roles, id = 833017692322529370)
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 = "Muted duration:", value = f"{origin_duration}
{unit}", 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)
await member.add_roles(muted_role, reason = f'{member.name} was muted from
the server by {ctx.author.name} for {origin_duration} {unit} and for the reason:
"{reason}".')
print(f'{member.display_name} was temporarily muted from the sever by
{ctx.author.name} for {origin_duration} {unit} and for the reason "{reason}".')
await asyncio.sleep(seconds_duration)
await member.remove_roles(muted_role, reason = "Duration ended.")

@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

elif message.content == f"<@{bot.user.id}>":


await message.channel.send(':flag_gb: My prefix is "``.``"; you can use
"``.help en``" if needed.\n:flag_fr: Mon préfixe est "``.``"; vous pouvez utiliser
"``.help fr``" si besoin.')

elif "salut" in message.content or "slt" in message.content or "bonjour" in


message.content or "bjr" in message.content or "bonsoir" in message.content or
"bsr" in message.content or "hey" in message.content or "hi" in message.content or
"hello" in message.content:
await message.add_reaction("👋")

elif "pp" in message.content:


random_num = randrange(10)
if random_num == 0:
await message.channel.send("8=D")
elif random_num == 1:
await message.channel.send("8==D")
elif random_num == 2:
await message.channel.send("8===D")
elif random_num == 3:
await message.channel.send("8====D")
elif random_num == 4:
await message.channel.send("8=====D")
elif random_num == 5:
await message.channel.send("8======D")
elif random_num == 6:
await message.channel.send("8=======D")
elif random_num == 7:
await message.channel.send("8=======D")
elif random_num == 8:
await message.channel.send("8========D")
elif random_num == 9:
await message.channel.send("8=========D")

elif "quoi" in message.content:


await message.channel.send("feur")

elif message.content == "ouge" or message.content == "gorge":


await message.channel.send("gorge")

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)

elif isinstance(error, commands.MissingPermissions):


await ctx.send(":flag_gb: Sorry, you are missing a permission to use
that command...\n:flag_fr: Désolé, tu as besoin d'une permissions pour utiliser
cette commande...")
print(f'{ctx.author.name} tried to use a command but don\'t have the
required permission to do it...')
await delete_messages(ctx, 1, 3)

elif isinstance(error, commands.CommandNotFound):


await ctx.send(":flag_gb: This command does not exist...\n:flag_fr:
Cette commande n'existe pas...")
print(f'{ctx.author.name} tried to use a command which does not
exist...')
await delete_messages(ctx, 1, 3)

elif isinstance(error, discord.errors.NotFound):


return

@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)

elif message_id == 976010345799893003:


if payload.emoji.name == '🇬🇧':
role = discord.utils.get(guild.roles, id = 825342256730865674)
await reaction_add(member, role)
elif payload.emoji.name == '🇫🇷':
role = discord.utils.get(guild.roles, id = 825342257540366336)
await reaction_add(member, role)
elif payload.emoji.name == '🇪🇸':
role = discord.utils.get(guild.roles, id = 825342257904615476)
await reaction_add(member, role)

elif message_id == 976010357439074364:


if payload.emoji.name == '🎥':
role = discord.utils.get(guild.roles, id = 825342259263307807)
await reaction_add(member, role)
elif payload.emoji.name == '🐦':
role = discord.utils.get(guild.roles, id = 825342260262207499)
await reaction_add(member, role)
elif payload.emoji.name == '📸':
role = discord.utils.get(guild.roles, id = 825342260911800321)
await reaction_add(member, role)
elif payload.emoji.name == '🎵':
role = discord.utils.get(guild.roles, id = 844645002599465003)
await reaction_add(member, role)

elif message_id == 975847067282989146:


if payload.emoji.name == '📩':
everyone_role = discord.utils.get(guild.roles, id =
825341656567513098)
ticket_pannel_channel = bot.get_channel(829972950240460801)
member_ticket = await guild.create_text_channel(name =
f"{member.name}-ticket")

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)

embed = discord.Embed(title = "", description = "", inline =


False, color = 0x2ECC70)
embed.add_field(name = '**Ticket opened**', value = 'Please send
your application. A staff member will read it and give you an answer in the next 24
hours.', inline = False)
await member_ticket.send(embed = embed)

messages_to_delete = await ticket_pannel_channel.send(f"And here


it is {member.mention}: <#{member_ticket.id}>.")

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)

elif message_id == 976010357439074364:


if payload.emoji.name == '🎥':
role = discord.utils.get(guild.roles, id = 825342259263307807)
await reaction_remove(member, role)
elif payload.emoji.name == '🐦':
role = discord.utils.get(guild.roles, id = 825342260262207499)
await reaction_remove(member, role)
elif payload.emoji.name == '📸':
role = discord.utils.get(guild.roles, id = 825342260911800321)
await reaction_remove(member, role)
elif payload.emoji.name == '🎵':
role = discord.utils.get(guild.roles, id = 844645002599465003)
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.")

elif before.channel is not None and len(before.channel.members) == 0:


try:
if before.channel.id == member_channel.id:
await before.channel.delete()
print(f"I deleted {member_channel.name}.")
except NameError:
return
if after.channel is not None and after.channel.id == 825342280269430844 and
before.channel != after.channel:
await notifs_channel.send(f"<@&867506950774456390>, {member.mention}
est dans le salon <#825342280269430844>.")
print(f"I notified @DISCORD STAFF that {member.name} was in the
#『🔊』Heptorion support channel.")

elif after.channel is not None and after.channel.id == 845374406493995038 and


before.channel != after.channel:
await notifs_channel.send(f"<@&867506950774456390>, {member.mention}
est dans le salon <#845374406493995038>.")
print(f"I notified @➤ Modération and @➤ Administration that
{member.name} was in the #『✈』Waiting to moove 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)

fun_embed = discord.Embed(title = "**Commandes amusantes**",


description = "", inline = False, color = 0xfdfdfd)
fun_embed.add_field(name = ".noice", value = 'Le bot enverra le meme
"noice".\n__Permission requise:__ aucune.', inline = False)
fun_embed.add_field(name = ".ok", value = 'Le bot enverra le meme
"ok".\n__Permission requise:__ aucune.', inline = False)
fun_embed.add_field(name = ".issou", value = 'Le bot enverra le meme
"issou".\n__Permission requise:__ aucune.', inline = False)
fun_embed.add_field(name = ".creator (ou .programer)", value = 'Le bot
enverra qui est le programmeur de celui-ci.\n__Permission requise:__ aucune.',
inline = False)

mod_embed = discord.Embed(title = "**Commandes modération**",


description = "", inline = False, color = 0xfdfdfd)
mod_embed.add_field(name = ".edit <identifiant du message> <en quoi
vous voulez modifier ce message>", value = 'Le bot modifiera le message
correspondant à l\'identifiant que vous avez mit en ce que vous voulez.\
n__Permission requise:__ administrateur.', inline = False)
mod_embed.add_field(name = ".addreaction <identifiant du message> <quel
réaction vous voulez ajouter à ce message>", value = 'Le bot ajoutera la réaction
que vous voulez au message correspondant à l\'identifiant que vous avez mit.\
n__Permission requise:__ gérer les messages.', inline = False)
mod_embed.add_field(name = ".message (ou .msg) <@utilsateur> <message à
envoyer>", value = 'Le bot enverra le message que vous voulez à l\'utilisateur que
vous voulez. \n__Permission requise:__ administrateur.', inline = False)
mod_embed.add_field(name = ".vote <vote que vous voulez faire>", value
= 'Le bot lancera un vote déstinné à la communauté.\n__Permission requise:__
administrateur.', inline = False)
mod_embed.add_field(name = ".adminvote <vote que vous voulez faire>",
value = 'Le bot lancera un vote déstinné aux membres du staff.\n__Permission
requise:__ administrateur.', inline = False)
mod_embed.add_field(name = ".adminsay <ce que vous voulez que le bot
dise>", value = 'Le bot dira ce que vous voulez, sans préciser qui a executé la
commande.\n__Permission requise:__ administrateur.', inline = False)
mod_embed.add_field(name = ".clear (ou .c) <nombre de messages à
supprimer>", value = 'Le bot supprimera le nombre de messages que vous voulez.\
n__Permission requise:__ gérer les messages.', inline = False)
mod_embed.add_field(name = ".mute <@utilsateur> <raison>", value = 'Le
bot rendra muet de façon permanente l\'utilisateur que vous voulez.\n__Permission
requise:__ gérer les messages.', inline = False)
mod_embed.add_field(name = ".unmute <@utilisateur>", value = 'Le bot
rendra la parole à un utilisateur qui avait été rendu muet.\n__Permission
requise:__ gérer les messages.', inline = False)
mod_embed.add_field(name = ".kick <@utilisateur> <raison>", value = 'Le
bot exclura l\'utilisateur que vous voulez.\n__Permission requise:__ exclure.',
inline = False)
mod_embed.add_field(name = ".ban <@utilisateur> <raison>", value = 'Le
bot bannira l\'utilisateur que vous voulez.\n__Permission requise:__ bannir.',
inline = False)
mod_embed.add_field(name = '.unban <utilisateur (sans "@")>', value =
'Le bot débannira l\'utilisateur que vous voulez.\n__Permission requise:__
bannir.', inline = False)
mod_embed.add_field(name = ".gamestatus (ou .gs) <nom du jeu auquel
vous voulez que le BOT joue>", value = 'Le bot changera son statut de jeu en ce que
vous voulez.\n__Rôle requis:__ <@&827263176483274769>.', inline = False)
mod_embed.add_field(name = ".streamstatus (ou .ss) <nom du stream que
fait le BOT>,<URL de ce stream>", value = 'Le bot changera son statut de stream
avec le titre et le lien que vous voulez.\n__Rôle requis:__
<@&827263176483274769>.', inline = False)
mod_embed.add_field(name = ".watchstatus (ou ws) <nom de la vidéo que
tu veux que le BOT regarde>", value = 'Le bot changera son statut de regard en ce
que vous voulez.\n__Rôle requis:__ <@&827263176483274769>.', inline = False)
mod_embed.add_field(name = ".listenstatus (ou .ls) <nom du son que tu
veux que le bot écoute>", value = 'Le bot changera son statut d\'écoute en ce que
vous voulez.\n__Rôle requis:__ <@&827263176483274769>.', inline = False)
mod_embed.add_field(name = ".getmsgcontentpython", value = 'Le bot
enverra le contenu du message en style Python (language de programmation utilisé
pour programmer le bot) que vous voulez dans la console (la page qui s\'affiche
lorsque l\'on lance le bot).\n__Utilisateur requis:__ <@472800795591442443>.',
inline = False)
mod_embed.add_field(name = ".getmsgcontentdiscord", value = 'Le bot
enverra le contenu du message en style Discord (style normal, usuel) que vous
voulez dans la console (la page qui s\'affiche lorsque l\'on lance le bot).\
n__Utilisateur requis:__ <@472800795591442443>.', inline = False)
mod_embed.add_field(name = ".shutdown", value = 'Le bot deviendra hors-
ligne e t inutilisable.\n__Rôle requis:__ <@&827263176483274769>.', inline = False)

oth_embed = discord.Embed(title = "**Autres commandes**", description =


"", inline = False, color = 0xfdfdfd)
oth_embed.add_field(name = ".reportbug <le bug que vous voulez
signaler>", value = 'Le bot fera remonter au personnel de la Noxade le bug que vous
voulez (peu importe le bug, bug du bot ou même mauvaise permissions sur le serveur
etc).\n__Permission requise:__ aucune.', inline = False)
oth_embed.add_field(name = ".reportuser <@utilsateur> <raison avec le
lien du message que vous voulez signaler ou le lien du premier message d\'une
conversation que vous voulez signaler>", value = 'Le bot fera remonter au personnel
de la Noxade l\'utilisateur que vous voulez pour la raison que vous voulez.\
n__Permission requise:__ aucune.', inline = False)
oth_embed.add_field(name = ".ping", value = 'Le bot enverra son ping.\
n__Permission requise:__ aucune.', inline = False)
oth_embed.add_field(name = ".help", value = 'Le bot enverra ce messages
avec toutes les commandes disponible avec lui, leur description et quel
permissions/rôle sont requis pour les utiliser.\n__Permission requise:__ aucune.',
inline = False)

help = await ctx.send(embed = help_embed, components = [action_row])

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

print(f'{ctx.author.name} used the command "help".')

@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(name = "gamestatus", aliases = ["gs"])


@commands.has_role(827263176483274769)
async def _gamestatus(ctx, *, game_name = ".help"):
await bot.change_presence(activity = discord.Game(name = game_name))
await ctx.send(f':flag_gb: Fine! My game status was set to
"**{game_name}**"!\n:flag_fr: Bien! Mon statut de jeu a été modifié en
"**{game_name}**"!')
print(f'{ctx.author.name} used the command "gamestatus" and updated it in
"{game_name}".')

@bot.command(name = "listenstatus", aliases = ["ls"])


@commands.has_role(827263176483274769)
async def _listenstatus(ctx, *, song_name = ".help"):
await bot.change_presence(activity = discord.Activity(type =
discord.ActivityType.listening, name = song_name))
await ctx.send(f':flag_gb: Fine! My listen status was set to
"**{song_name}**"!\n:flag_fr: Bien! Mon statut d\'écoute a été modifié en
"**{song_name}**"!')
print(f'{ctx.author.name} used the command "listenstatus" and updated it in
"{song_name}".')

@bot.command(name = "watchstatus", aliases = ["ws"])


@commands.has_role(827263176483274769)
async def _watchstatus(ctx, *, video_name = ".help"):
await bot.change_presence(activity = discord.Activity(type =
discord.ActivityType.watching, name = video_name))
await ctx.send(f':flag_gb: Fine! My watch status was set to
"**{video_name}**"!\n:flag_fr: Bien! Mon status de regard a été modifié en
"**{video_name}**"!')
print(f'{ctx.author.name} used the command "watchstatus" and updated it in
"{video_name}".')

@bot.command(name = "streamstatus", aliases = ["ss"])


@commands.has_role(827263176483274769)
async def _streamstatus(ctx, *, streamInfos):
streamName, streamURL = streamInfos.split(";")
await bot.change_presence(activity = discord.Streaming(name = streamName, url
= streamURL))
await ctx.send(f':flag_gb: Fine! My stream status was set to
"**{streamName}**" with the URL "**{streamURL}**"!\n:flag_fr: Bien! Mon status de
stream a été modifié en "**{streamName}**" avec l\'URL "**{streamURL}**"!')

@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(name = "adminsay", aliases = ["as"])


@commands.has_permissions(administrator = True)
async def _adminsay(ctx, *, content):
await delete_messages(ctx)
await ctx.send(content)
print(f'{ctx.author.name} used the command "adminsay", and made me say:
"{content}".')

@bot.command(name = "creator", aliases = ["programer"])


async def _creator(ctx):
await ctx.send(':flag_gb: Sykman#2824 is my creator/programer !\n:flag_fr:
Sykman#2824 est mon créateur/programmeur !')

@bot.command(name = "clear", aliases = ["c"])


@commands.has_permissions(manage_messages = True)
async def _clear(ctx, number: int):
await delete_messages(ctx, number + 1)
await ctx.send(f":flag_gb: I just deleted **{number}** messages !\n:flag_fr:
Je viens de supprimer **{number}** messages !")
print(f'{ctx.author.name} used the command "clear" and made me delate
{number} messages.')
await delete_messages(ctx, 1, 3)

@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)

elif unit == "h":


seconds_duration = origin_duration * 3600
await tempmute_function(ctx, member, origin_duration, reason,
seconds_duration, unit)

elif unit == "d":


seconds_duration = origin_duration * 86400
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(name = "cimakipomeme", aliases = ["cmkpm"])


async def _cimakipomeme(ctx):
await delete_messages(ctx)
await ctx.send(":flag_gb: *talks about anal searches with Lieutenant Tesla in
progress of technology*\n:flag_fr: *parle de fouilles anales avec Lieutenant Tesla
en cours de technologie*")

@bot.command(name = "sykmanmeme", aliases = ["skmnm"])


async def _sykmanmeme(ctx, number = "1"):
await delete_messages(ctx)
if number == "1":
await ctx.send(':flag_gb: *pretends to do "things" at a table*\
nTeacher: "What are you doing at the table ?"\nSykman: "No teacher that is not what
you think !"\n\n:flag_fr: *fait semblant de faire des "choses" à une table*\
nProfesseure: "Tu fais quoi à la table ?"\nSykman: "Non madame ce n\'est pas ce que
vous croyez !"')
print(f'{ctx.author.name} used the command "sykmanmeme 1".')
elif number == "2":
await ctx.send(":flag_gb: Warden, can you help me get this fixed leg
off my hand, please ?\n:flag_fr: Monsieur le surveillant, vous pouvez m'aidez à
décoller ce bout de patte à fixe de ma main s'il vous plaît ?")

@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(name = "message", aliases = ["msg"])


@commands.has_permissions(administrator = True)
async def _msg(ctx, member: discord.Member, *, message):
await member.send(message)
await ctx.send(f':flag_gb: I sent your message to {member.mention} !\
n:flag_fr: J\'ai envoyé votre mesesage à {member.mention} !')
print(f'{ctx.author.name} used the command "message" to send "{message}" to
{member.name}.')

@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)

sykman_embed_fr = discord.Embed(title = f"**Les informations de


{member.name}:**", description = "", inline = False, color = 0xfdfdfd)
sykman_embed_fr.set_thumbnail(url = member.avatar_url)
sykman_embed_fr.add_field(name = "Pseudonyme:", value =
f"{member.name}#{member.discriminator}", inline = True)
sykman_embed_fr.add_field(name = "Date de naissance (JJ/MM/AAAA) et
âge:", value = "22/08/2006, 15 ans", inline = True)
sykman_embed_fr.add_field(name = "Biographie:", value = f'Né le 22 août
2006 dans le sud de la France, {member.name}, de son vrai nom Mathis, voulait
devenir joueur professionnel sur Counter-Strike: Global Offensive à l’âge de 13
ans, avant de comprendre que c’était vraiment difficile et de choisir un second
plan "au cas où", et de choisir de devenir programmeur. Il est un des fondateurs du
groupe HĖPŦØRIØN, dont il est un des programmeur. Dans HĖPŦØRIØN, il s\'occupe de
développer le robot d\'HĖPŦØRIØN, et le jeu que nous sommes en train de créer. Vous
pouvez le trouver sur:\n``— Twitch (__Sykman)``\n``— YouTube (Sykman)``\n``—
Twitter (@Sykman_)``', inline = False)
await ctx.send(":flag_fr:")
await ctx.send(embed = sykman_embed_fr)

elif member.id == 693383592465924116:


kronos_embed_en = discord.Embed(title = f"**{member.name}'s
informations:**", description = "", inline = False, color = 0xfdfdfd)
kronos_embed_en.set_thumbnail(url = member.avatar_url)
kronos_embed_en.add_field(name = "Pseudonym:", value =
f"{member.name}#{member.discriminator}", inline = True)
kronos_embed_en.add_field(name = "Date of birth (MM/DD/YYYY) and age:",
value = "08/21/2006, 15 years old", inline = True)
kronos_embed_en.add_field(name = "Biography:", value = f'Born on 21
August 2006 in the South of France, {member.name}, whose real name is Guillaume,
has always loved science, and has started to learn drums (2 years of practice). He
also loves reading, especially mangas. Hollow6541 would like to study astronomy,
and would like to do a job in this sector. He loves Aurélien Barrau, a french
astrophysicist. He is one of the founders of the HĖPŦØRIØN group, in which he
created the logo with the indications of the other members. With Lieutenant Tesla,
he is in charge of realizing all the graphic design part of the game that we are
currently creating.\nYou can find him on:\n``— Chess.com (H0ll0w6541)``\n``— League
of Legend (Hølløw6541)``', inline = False)
await ctx.send(":flag_gb:")

await ctx.send(embed = kronos_embed_en)


kronos_embed_fr = discord.Embed(title = f"**Les informations de
{member.name}:**", description = "", inline = False, color = 0xfdfdfd)
kronos_embed_fr.set_thumbnail(url = member.avatar_url)
kronos_embed_fr.add_field(name = "Pseudonyme:", value =
f"{member.name}#{member.discriminator}", inline = True)
kronos_embed_fr.add_field(name = "Date de naissance (JJ/MM/AAAA) et
âge:", value = "21/08/2006, 15 ans", inline = True)
kronos_embed_fr.add_field(name = "Biographie:", value = f'Né le 21 août
2006 dans le Sud de la France, {member.name}, de son vrai nom Guillaume, aime les
sciences depuis toujours, et a commencé à apprendre la batterie (2 ans de
pratique). Il aime aussi beaucoup la lecture, notamment les mangas. Hollow6541
voudrait faire des études d\'astronomie, et voudrait faire un métier dans ce
secteur. Il adore Aurélien Barrau, un astrophysicien français. Il est l\'un des
fondateurs du groupe HĖPŦØRIØN, dans lequel il a réalisé le logo avec les
indications des autres membres. Avec Lieutenant Tesla, il s\'occupe de réaliser
toute la partie design graphique du jeu que nous sommes actuellement en train de
créer.\nVous pouvez le retrouver sur:\n``— Chess.com (H0ll0w6541)``\n``— League of
Legend (Hølløw6541)``', inline = False)
await ctx.send(":flag_fr:")
await ctx.send(embed = kronos_embed_fr)

elif member.id == 815566873675694110:


lieutenant_tesla_embed_en = discord.Embed(title = f"**{member.name}'s
informations:**", description = "", inline = False, color = 0xfdfdfd)
lieutenant_tesla_embed_en.set_thumbnail(url = member.avatar_url)
lieutenant_tesla_embed_en.add_field(name = "Pseudonym:", value =
f"{member.name}#{member.discriminator}", inline = True)
lieutenant_tesla_embed_en.add_field(name = "Date of birth (MM/DD/YYYY)
and age:", value = "08/22/2006, 15 years old", inline = True)
lieutenant_tesla_embed_en.add_field(name = "Biography:", value = f'Born
on 22 August 2006 in the south of France, {member.name}, whose real name is Sacha,
has always loved music, he currently plays piano (5th year of classes) and drums,
although he stopped taking classes (6 years of practice). He also loves reading and
especially mangas, science, as well as off-road cycling and computer science. He
aims to do a job in astronomy or astrophysics, or else, to become a programmer
(like Sykman). He is one of the founders of the group HĖPŦØRIØN, of which he is a
graphic designer. In HĖPŦØRIØN, with Hollow, he takes care of doing all the graphic
design part of the game that we are currently creating, and he also programs the
company’s website. Unfortunately, you can’t find him on any platform.', inline =
False)
await ctx.send(":flag_gb:")
await ctx.send(embed = lieutenant_tesla_embed_en)

lieutenant_tesla_embed_fr = discord.Embed(title = f"**Les informations


de {member.name}:**", description = "", inline = False, color = 0xfdfdfd)
lieutenant_tesla_embed_fr.set_thumbnail(url = member.avatar_url)
lieutenant_tesla_embed_fr.add_field(name = "Pseudonyme:", value =
f"{member.name}#{member.discriminator}", inline = True)
lieutenant_tesla_embed_fr.add_field(name = "Date de naissance
(JJ/MM/AAAA) et âge:", value = "08/22/2006, 15 ans", inline = True)
lieutenant_tesla_embed_fr.add_field(name = "Biographie:", value = f'Né
le 22 août 2006 dans le sud de la France, {member.name}, de son vrai nom Sacha,
aime la musique depuis toujours, il joue actuellement du piano (5ème année de
cours) et de la batterie, bien qu\'il ait arrêté de prendre des cours (6 ans de
pratique). Il aime aussi beaucoup la lecture et particulièrement les mangas, les
sciences, ainsi que le vélo tout terrain et l\'informatique. Il ambitionne de faire
un métier dans l\'astronomie ou l\'astrophysique, ou sinon, de devenir programmeur
(comme Sykman). Il est un des fondateurs du groupe HĖPŦØRIØN, dont il est un des
designers graphiques. Dans HĖPŦØRIØN, avec Hollow, il s\'occupe de faire toute la
partie design graphique du jeu que nous sommes actuellement en train de créer, et
il programme aussi le site web de l\'entreprise. Vous ne pouvez malheureusement le
trouver sur aucune plateforme.', inline = False)
await ctx.send(":flag_fr:")
await ctx.send(embed = lieutenant_tesla_embed_fr)

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)

server_embed_fr = discord.Embed(title = "**Les informations du serveur


discord:**", description = "", inline = False, color = 0xfdfdfd)
server_embed_fr.set_thumbnail(url = ctx.guild.icon_url)
server_embed_fr.add_field(name = "Pseudonyme:", value = "HĖPŦØRIØN", inline =
False)
server_embed_fr.add_field(name = "Date de naissance (JJ/MM/AAAA) et âge:",
value = "27/03/2021, 1 ans", inline = False)
#server_embed_fr.add_field(name = "Biographie", value = "", inline = False)
await ctx.send(":flag_fr:")
await ctx.send(embed = server_embed_fr)

@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)

rules_embed_fr = discord.Embed(title = "**RÈGLEMENT**", description = "",


inline = False, color = 0xfdfdfd)
rules_embed_fr.set_thumbnail(url =
"https://upload.wikimedia.org/wikipedia/commons/thumb/c/c3/Flag_of_France.svg/
1200px-Flag_of_France.svg.png")
rules_embed_fr.add_field(name = "**__I - GÉNÉRALEMENT:__**", value =
"Insultes interdites.\n\nContenus pornographiques interdits.\n\nContenus racistes
interdits.\n\nIl est interdit de s'exprimer sur sa religion ou ses croyances (pour
éviter toutes formes de racisme).\n\nContenus sexistes interdits.\n\nContenus
homophobes interdits.\n\nRespect mutuel obligatoire.\n\nContenus menaçants
interdit.\n\nDiscriminations (=inégalité de traitement en fonction de la personne)
interdites.\n\nSpams interdits.", inline = False)
rules_embed_fr.add_field(name = "**__II - SALONS ÉCRITS:__**", value = "Tous
liens douteux, inconnus ou dangereux sont interdits.\n\nLa publicité est interdite
sauf si autorisation d'un membre du personnel.", inline = False)
rules_embed_fr.add_field(name = "**__III - SALONS VOCAUX:__**", value =
"Changements de salon vocal excessif interdits.", inline = False)
rules_embed_fr.add_field(name = "**__IV - AUTRE:__**", value = "Usurpation
d'identité (vol de pseudo en fait parti) interdit.\n\nIl est interdit de quitter le
serveur pour échapper à une sanction sous peine de se faire bannir temporairement
pendant le double de la durée de la sanction qui était prévu à la base.", inline =
False)

await ctx.send(embed = rules_embed_en)


await ctx.send(embed = rules_embed_fr)
message = await ctx.send(":flag_gb: To accept the above regulation and have
access to the rest of the server, please check the following reaction:\n\n:flag_fr:
Pour accepter le réglement ci-dessus et avoir accès au reste du serveur, veuillez
ajouter la réaction suivante:")
await message.add_reaction("✅")

@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("")

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy