Skip to content

Commit

Permalink
Add: UserInfo command
Browse files Browse the repository at this point in the history
  • Loading branch information
Sitois authored May 1, 2024
1 parent 58b80ce commit 1ee1018
Show file tree
Hide file tree
Showing 3 changed files with 105 additions and 14 deletions.
3 changes: 2 additions & 1 deletion commands/help.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ async def utils(self, ctx):
`{config_selfbot.prefix}snipe`: {langs.help_general_snipe[config_selfbot.lang]}
`{config_selfbot.prefix}clear`: {langs.help_general_clear[config_selfbot.lang]}
`{config_selfbot.prefix}hype`: {langs.help_general_hype[config_selfbot.lang]} (bravery, brilliance, balance).
`{config_selfbot.prefix}bio`: {langs.help_general_bio[config_selfbot.lang]}.""")
`{config_selfbot.prefix}bio`: {langs.help_general_bio[config_selfbot.lang]}.
`{config_selfbot.prefix}userinfo`: {langs.help_general_user_info[config_selfbot.lang]}""")
await asyncio.sleep(config_selfbot.deltime)
await ctx.message.delete()

Expand Down
35 changes: 35 additions & 0 deletions commands/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,39 @@ async def bio(self, ctx):
await self.bot.user.edit(bio=new_bio)
await ctx.message.edit(f"📖 Bio {langs.bio_command[config_selfbot.lang]} \"`{new_bio}`\"")
await asyncio.sleep(config_selfbot.deltime)
await ctx.message.delete()

@commands.command()
async def userinfo(self, ctx):
if ctx.message.mentions:
user = ctx.message.mentions[0]
else:
user = ctx.author

if user is None:
await ctx.message.edit("Impossible de trouver cet utilisateur.")
return

if ctx.guild:
guild = ctx.guild
member = guild.get_member(user.id)
roles = [role.name for role in member.roles[1:] if role.name != '@everyone'] if member else []
else:
roles = []


if roles:
roles_list = f"> 🎭| {langs.info_roles[config_selfbot.lang]}: {', '.join(roles)}\n"

message = f"""🗒️| {langs.info_title[config_selfbot.lang]} <@{user.id}> :
> 👤| {langs.info_global[config_selfbot.lang]}: `{user.global_name}`
> 🌐| {langs.info_username[config_selfbot.lang]}: `{user.name}`
> 🆔| ID: `{user.id}`
> 🌈| {langs.info_banner[config_selfbot.lang]}: `{user.banner.url if not user.banner is None else langs.empty[config_selfbot.lang]}`
> 📅| {langs.info_created_at[config_selfbot.lang]}: `{user.created_at.strftime('%d/%m/%Y %H:%M:%S')}`
{"> 🖼️| " + langs.info_avatar[config_selfbot.lang] + ": [" + langs.info_avatar_link[config_selfbot.lang] + "](" + user.avatar.url + ")" if not user.avatar is None else langs.empty[config_selfbot.lang]}
{roles_list if ctx.guild else ""}"""

await ctx.message.edit(message)
await asyncio.sleep(config_selfbot.deltime)
await ctx.message.delete()
81 changes: 68 additions & 13 deletions langs.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,22 @@
"en": "disabled!"
}


empty = {
"fr": "Aucune",
"en": "Empty"
"en": "None"
}

author = {
"fr": "Auteur",
"en": "Author"
}

incorrect = {
"fr": "Choix incorrect.",
"en": "Incorrect choice."
}

####################
# launch #
# translation !!! #
Expand Down Expand Up @@ -153,6 +159,11 @@
"en": "Clear given number of messages."
}

help_general_user_info = {
"fr": "Renvoie les informations sur l'utilisateur mentionné",
"en": "Return informations about the mentionned user"
}

help_voice_vc = {
"fr": "Rejoins le salon vocal",
"en": "Join the voice channel"
Expand Down Expand Up @@ -329,6 +340,46 @@
"en": "is invalid!"
}

info_title = {
"fr": "Informations sur",
"en": "Informations about"
}

info_global = {
"fr": "Nom d'affichage",
"en": "Display name"
}

info_banner = {
"fr": "Bannière",
"en": "Banner"
}

info_created_at = {
"fr": "Créé le",
"en": "Created at"
}

info_avatar = {
"fr": "Photo de profil",
"en": "Avatar"
}

info_avatar_link = {
"fr": "Lien vers la photo",
"en": "Avatar's link"
}

info_roles = {
"fr": "Rôles",
"en": "Roles"
}

info_username = {
"fr": "Nom d'utilisateur",
"en": "Username"
}

raid_in_process = {
"fr": "☣️ Raid en cours...",
"en": "☣️ Raid in progress..."
Expand Down Expand Up @@ -396,12 +447,6 @@




rpc_status_translate = {
"fr": "Défini le statut du RPC",
"en": "Set RPC's status"
}

rpc_name_translate = {
"fr": "Défini le nom du RPC",
"en": "Set RPC's name"
Expand All @@ -427,14 +472,24 @@
"en": "Set RPC's type (game / watch / listen / stream)"
}

rpc_id_translate = {
"fr": "Défini l'ID de l'application pour le RPC",
"en": "Set RPC's Application ID"
rpc_large_image_translate = {
"fr": "Défini la grande image du RPC",
"en": "Set RPC's large image"
}

rpc_large_text_translate = {
"fr": "Défini le texte de la grande image du RPC",
"en": "Set RPC's large image text"
}

rpc_small_image_translate = {
"fr": "Défini la petite image du RPC",
"en": "Set RPC's small image"
}

rpc_image_translate = {
"fr": "Défini l'image du RPC",
"en": "Set RPC's image"
rpc_small_text_translate = {
"fr": "Défini le texte de la petite image du RPC",
"en": "Set RPC's small image text"
}

rpc_button_text_one_translate = {
Expand Down

0 comments on commit 1ee1018

Please sign in to comment.