mirror of
https://github.com/wlinator/luminara.git
synced 2024-10-02 20:23:12 +00:00
Add invite author to invite description
This commit is contained in:
parent
5149fa172c
commit
8f542865ed
2 changed files with 31 additions and 1 deletions
|
@ -205,7 +205,8 @@
|
|||
"intro_too_long": "your answer was too long, please keep it below 200 characters.",
|
||||
"intro_too_long_author": "Answer Too Long",
|
||||
"invite_button_text": "Invite Lumi",
|
||||
"invite_description": "Thanks for inviting me to your server!",
|
||||
"invite_author": "Invite Lumi",
|
||||
"invite_description": "thanks for inviting me to your server!",
|
||||
"level_up": "📈 | **{0}** you have reached **Level {1}**.",
|
||||
"level_up_prefix": "📈 | **{0}** ",
|
||||
"lumi_exception_blacklisted": "User is blacklisted",
|
||||
|
|
29
modules/misc/invite.py
Normal file
29
modules/misc/invite.py
Normal file
|
@ -0,0 +1,29 @@
|
|||
from discord.ext import commands
|
||||
from lib.const import CONST
|
||||
from ui.embeds import builder
|
||||
from ui.views.invite import InviteButton
|
||||
|
||||
|
||||
class Invite(commands.Cog):
|
||||
def __init__(self, bot: commands.Bot):
|
||||
self.bot = bot
|
||||
|
||||
@commands.hybrid_command(
|
||||
name="invite",
|
||||
aliases=["inv"],
|
||||
usage="invite",
|
||||
)
|
||||
async def invite(self, ctx: commands.Context[commands.Bot]) -> None:
|
||||
await ctx.send(
|
||||
embed=builder.create_embed(
|
||||
theme="success",
|
||||
user_name=ctx.author.name,
|
||||
author_text=CONST.STRINGS["invite_author"],
|
||||
description=CONST.STRINGS["invite_description"],
|
||||
),
|
||||
view=InviteButton(),
|
||||
)
|
||||
|
||||
|
||||
async def setup(bot: commands.Bot) -> None:
|
||||
await bot.add_cog(Invite(bot))
|
Loading…
Reference in a new issue