forked from gooberinc/goober
Please enter the commit message for your changes. Lines starting
with '#' will be ignored, and an empty message aborts the commit.
This commit is contained in:
parent
c732049d79
commit
6637ece3d8
5 changed files with 14 additions and 5 deletions
11
bot.py
11
bot.py
|
@ -23,6 +23,7 @@ import requests
|
|||
|
||||
import discord
|
||||
from discord.ext import commands
|
||||
from discord import app_commands
|
||||
from discord import Colour, Embed, File, Interaction, Message
|
||||
from discord.abc import Messageable
|
||||
|
||||
|
@ -30,7 +31,7 @@ from better_profanity import profanity
|
|||
from discord.ext import commands
|
||||
|
||||
from modules.central import ping_server
|
||||
from modules.volta.main import _
|
||||
from modules.volta.main import _, set_language
|
||||
from modules.markovmemory import *
|
||||
from modules.version import *
|
||||
from modules.sentenceprocessing import *
|
||||
|
@ -353,6 +354,14 @@ async def help(ctx: commands.Context) -> None:
|
|||
|
||||
await send_message(ctx, embed=embed)
|
||||
|
||||
@bot.hybrid_command(description=f"{(_('command_desc_setlang'))}")
|
||||
@app_commands.describe(locale="Choose your language")
|
||||
async def setlanguage(ctx: commands.Context, locale: str) -> None:
|
||||
await ctx.defer()
|
||||
set_language(locale)
|
||||
|
||||
await ctx.send(":thumbsup:")
|
||||
|
||||
# Event: Called on every message
|
||||
@bot.event
|
||||
async def on_message(message: discord.Message) -> None:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue