mirror of
https://github.com/osmarks/autobotrobot
synced 2024-11-05 00:06:17 +00:00
allowed mentions hotfix
This commit is contained in:
parent
04e8893b49
commit
e8fbebcbaa
@ -23,6 +23,7 @@ achievements = {
|
||||
async def achieve(bot: commands.Bot, message: discord.Message, achievement):
|
||||
guild_conf = await bot.database.execute_fetchone("SELECT achievement_messages FROM guild_config WHERE id = ?", (message.guild.id,))
|
||||
if guild_conf and guild_conf["achievement_messages"] == 0: return
|
||||
channel = message.channel
|
||||
|
||||
uid = message.author.id
|
||||
# ensure the user doesn't have achievements off
|
||||
@ -38,7 +39,7 @@ async def achieve(bot: commands.Bot, message: discord.Message, achievement):
|
||||
description = f"Congratulations, {message.author.name}#{message.author.discriminator}! You achieved the achievement __{achievement_info.name}__.\n\n{achievement_info.description}\n*{achievement_info.condition}*"
|
||||
e = util.make_embed(description=description, title="Achievement achieved!", color=util.hashbow(achievement))
|
||||
e.set_thumbnail(url=await util.get_asset(bot, f"achievements/{achievement}.png"))
|
||||
await message.channel.send(embed=e)
|
||||
await channel.send(embed=e)
|
||||
await bot.database.execute("INSERT INTO achievements VALUES (?, ?, ?)", (uid, achievement, util.timestamp()))
|
||||
await bot.database.commit()
|
||||
logging.info("awarded achievement %s to %s", message.author.name, achievement)
|
||||
|
@ -22,7 +22,8 @@ config = util.config
|
||||
|
||||
logging.basicConfig(level=logging.INFO, format="%(levelname)s %(asctime)s %(message)s", datefmt="%H:%M:%S %d/%m/%Y")
|
||||
|
||||
bot = commands.Bot(command_prefix=config["prefix"], description="AutoBotRobot, the most useless bot in the known universe.", case_insensitive=True)
|
||||
bot = commands.Bot(command_prefix=config["prefix"], description="AutoBotRobot, the most useless bot in the known universe.",
|
||||
case_insensitive=True, allowed_mentions=discord.AllowedMentions(everyone=False, users=True, roles=True))
|
||||
bot._skip_check = lambda x, y: False
|
||||
|
||||
|
||||
@ -162,9 +163,9 @@ You can also invite it to your server: <https://discordapp.com/oauth2/authorize?
|
||||
async def random_int(ctx, *, dice):
|
||||
await ctx.send(rolldice.roll_dice(dice)[0])
|
||||
|
||||
bad_things = ["lyric", "endos", "solarflame", "lyric", "319753218592866315", "andrew", "6", "c++"]
|
||||
good_things = ["potato", "heav", "gollark", "helloboi", "bees", "hellboy", "rust", "ferris", "crab", "transistor"]
|
||||
negations = ["not", "bad", "un", "kill", "n't"]
|
||||
bad_things = ["lyric", "solarflame", "lyric", "319753218592866315", "andrew", "6", "c++", "☭", "communism"]
|
||||
good_things = ["potato", "heav", "gollark", "helloboi", "bees", "hellboy", "rust", "ferris", "crab", "transistor", "endos", "make esolang"]
|
||||
negations = ["not", "bad", "un", "kill", "n't", "¬"]
|
||||
def weight(thing):
|
||||
lthing = thing.lower()
|
||||
weight = 1.0
|
||||
|
Loading…
Reference in New Issue
Block a user