diff --git a/discord_bot/bot_d.py b/discord_bot/bot_d.py index 0ab7fca..e0eb6e8 100644 --- a/discord_bot/bot_d.py +++ b/discord_bot/bot_d.py @@ -39,6 +39,7 @@ from .d_commands.info import info_cmd from .d_commands.poll import poll_cmd from .d_commands.reputation import rep_cmd +from .d_events.new_level import message_to_xp import discord_bot.d_commands.set as settings import discord_bot.d_commands.profile as profile import discord_bot.d_events.cooldown as cooldown @@ -113,7 +114,8 @@ def create_connection(path): welcomech INT NOT NULL, welcometext TEXT, goodbyech INT NOT NULL, - goodbyetext TEXT NOT NULL); + goodbyetext TEXT NOT NULL, + levelsystem TEXT NOT NULL); """) cursor.execute("""CREATE TABLE IF NOT EXISTS blacklist_guilds( guildid TEXT PRIMARY KEY); @@ -144,7 +146,7 @@ async def on_ready(): print('----------------------------------------------------------------------') boticord_token = os.environ['BOTICORDTOKEN'] bots_ds_token = os.environ['BOTSDST'] - game = discord.Game(str(len(bot.guilds)) + " guilds | =help", type=discord.ActivityType.watching) + game = discord.Game(str(len(bot.guilds)) + " guilds | " + botconfig['prefix'] + "help", type=discord.ActivityType.watching) await bot.change_presence(status=discord.Status.dnd, activity=game) res = requests.post("https://api.server-discord.com/v2/bots/785383439196487720/stats", headers={'Content-Type':'application/json', 'Authorization': 'SDC {0}'.format(bots_ds_token)}, json={'shards': 0, 'servers': len(bot.guilds)}) @@ -162,10 +164,10 @@ async def on_guild_join(guild): print(res.content.decode('utf-8')) res2 = requests.post("https://boticord.top/api/stats", headers={'Content-Type':'application/json', 'Authorization': '{}'.format(boticord_token)}, json={'shards': 0, 'servers': len(bot.guilds), 'users': len(bot.users)}) - game = discord.Game(str(len(bot.guilds)) + " guilds | =help", type=discord.ActivityType.watching) + game = discord.Game(str(len(bot.guilds)) + " guilds | " + botconfig['prefix'] + "help", type=discord.ActivityType.watching) await bot.change_presence(status=discord.Status.dnd, activity=game) - guild_s = [(guild.id, str(guild.region), 0, unix_time_millis(datetime.datetime.now()), "Enabled", 'Standart', '=', 'English', 0, '', 0, '')] - cursor.executemany("INSERT OR REPLACE INTO guilds VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);", guild_s) + guild_s = [(guild.id, str(guild.region), 0, unix_time_millis(datetime.datetime.now()), "Enabled", 'Standart', '=', 'English', 0, '', 0, '', "Disabled")] + cursor.executemany("INSERT OR REPLACE INTO guilds VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);", guild_s) # print(guild) connection.commit() await logging.joining_logger(bot, discord, guild, connection, cursor, unix_time_millis, botconfig) @@ -173,13 +175,18 @@ async def on_guild_join(guild): @bot.event async def on_guild_remove(guild): requests.post("https://api.server-discord.com/v2/bots/785383439196487720/stats", params={'id': 785383439196487720}, headers={'Authorization': os.environ['BOTSDST']}, data={'shards': 0, 'servers': len(bot.guilds)}) - game = discord.Game(str(len(bot.guilds)) + " guilds | =help", type=discord.ActivityType.watching) + game = discord.Game(str(len(bot.guilds)) + " guilds | " + botconfig['prefix'] + "help", type=discord.ActivityType.watching) await bot.change_presence(status=discord.Status.dnd, activity=game) await logging.leaving_logger(bot, discord, guild, connection, cursor, unix_time_millis, botconfig) @bot.event async def on_member_join(member): - await autorole.autorole(bot, discord, member, botconfig) + await autorole.autorole(bot, discord, member, botconfig, cursor, connection) + await autorole.new_member(bot, discord, member, botconfig, cursor, connection) + +@bot.event +async def on_member_remove(member): + await autorole.member_left(bot, discord, member, botconfig, cursor, connection) @bot.event async def on_message(message): @@ -199,8 +206,16 @@ async def on_message(message): except: lastmsgtime = 0 bot_data = [(0, 0)] + try: - if message.content.startswith(botconfig['prefix']): + if guild_result[6] == None or guild_result[6] == "": + prefix = botconfig['prefix'] + else: + prefix = guild_result[6] + except: + prefix = botconfig['prefix'] + try: + if message.content.startswith(botconfig['prefix']) or message.content.startswith(guild_result[6]): time_diff = ((datetime.datetime.utcnow() - epoch).total_seconds() * 1000) - one_result[6] if time_diff < 500: return await cooldown.cooldown(bot, message, one_result, guild_result, connection, cursor, unix_time_millis, ru_RU, en_US) @@ -246,7 +261,7 @@ async def on_message(message): "reputation": one_result[7] } if guild_result[4] == "Enabled": - guild = [(message.guild.id, guild_result[1], guild_result[2] + 1, guild_result[3], "Enabled", guild_result[5], guild_result[6], guild_result[7], guild_result[8], guild_result[9], guild_result[10], guild_result[11])] + guild = [(message.guild.id, guild_result[1], guild_result[2] + 1, guild_result[3], "Enabled", guild_result[5], guild_result[6], guild_result[7], guild_result[8], guild_result[9], guild_result[10], guild_result[11], guild_result[12])] guilddata_recovery = { "guildid": message.guild.id, "region": guild_result[1], @@ -262,7 +277,7 @@ async def on_message(message): "goodbyetext": guild_result[11], }, elif guild_result[4] == "Disabled": - guild = [(message.guild.id, guild_result[1], guild_result[2], guild_result[3], "Disabled", guild_result[5], guild_result[6], guild_result[7], guild_result[8], guild_result[9], guild_result[10], guild_result[11])] + guild = [(message.guild.id, guild_result[1], guild_result[2], guild_result[3], "Disabled", guild_result[5], guild_result[6], guild_result[7], guild_result[8], guild_result[9], guild_result[10], guild_result[11], guild_result[12])] guilddata_recovery = { "guildid": message.guild.id, "region": guild_result[1], @@ -278,7 +293,7 @@ async def on_message(message): "goodbyetext": guild_result[11], }, else: - guild = [(message.guild.id, guild_result[1], guild_result[2] + 1, guild_result[3], "Enabled", guild_result[5], guild_result[6], guild_result[7], guild_result[8], guild_result[9], guild_result[10], guild_result[11])] + guild = [(message.guild.id, guild_result[1], guild_result[2] + 1, guild_result[3], "Enabled", guild_result[5], guild_result[6], guild_result[7], guild_result[8], guild_result[9], guild_result[10], guild_result[11], guild_result[12])] guilddata_recovery = { "guildid": message.guild.id, "region": guild_result[1], @@ -320,66 +335,73 @@ async def on_message(message): pass if str(message.guild.region) == "russia": user = [(message.author.id, "Russian", 0, 10800000, unix_time_millis(message.created_at), "Disabled", unix_time_millis(message.created_at), 0, 0, 0)] - guild = [(message.guild.id, str(message.guild.region), 0, unix_time_millis(message.created_at), "Disabled", "Standart", "=", "Russian", 0, "", 0, "")] + guild = [(message.guild.id, str(message.guild.region), 0, unix_time_millis(message.created_at), "Disabled", "Standart", "=", "Russian", 0, "", 0, "", "Disabled")] else: - user = [(message.author.id, "English", 0, 10800000, unix_time_millis(message.created_at), "Disabled", unix_time_millis(message.created_at), 0, 0, 0)] - guild = [(message.guild.id, str(message.guild.region), 0, unix_time_millis(message.created_at), "Disabled", "Standart", "=", "English", 0, "", 0, "")] + user = [(message.author.id, "English", 0, 10800000, unix_time_millis(message.created_at), "Disabled", unix_time_millis(message.created_at), 0, 0, 0)] + guild = [(message.guild.id, str(message.guild.region), 0, unix_time_millis(message.created_at), "Disabled", "Standart", "=", "English", 0, "", 0, "", "Disabled")] print(e) bot_data = [(0, 0)] cursor.executemany("INSERT OR REPLACE INTO users VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?);", user) # print(user) connection.commit() - cursor.executemany("INSERT OR REPLACE INTO guilds VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);", guild) + cursor.executemany("INSERT OR REPLACE INTO guilds VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);", guild) # print(guild) cursor.executemany("INSERT OR REPLACE INTO bot_data VALUES(?, ?)", bot_data) connection.commit() + if guild_result[12] == "Enabled": + await message_to_xp(bot, discord, message, botconfig, platform, os, datetime, one_result, guild_result, localization, unix_time_millis, embed_color, connection, cursor, prefix) + timingcount = 0 - if message.content.startswith(botconfig['prefix']): + if message.content.startswith(botconfig['prefix']) or message.content.startswith(guild_result[6]): try: time_diff = (datetime.datetime.utcnow() - epoch).total_seconds() - 2 print(time_diff) if time_diff >= 120: pass - if message.content.startswith(botconfig['prefix'] + 'help'): + if message.content.startswith(botconfig['prefix'] + 'help') or message.content.startswith(guild_result[6] + 'help'): try: - await help_cmd(bot, discord, message, botconfig, os, platform, datetime, one_result, localization, embed_color) + await help_cmd(bot, discord, message, botconfig, os, platform, datetime, one_result, localization, embed_color, guild_result) except: if str(message.guild.region) == "russia": - await help_cmd(bot, discord, message, botconfig, os, platform, datetime, one_result, ru_RU.get(), botconfig['accent1']) + await help_cmd(bot, discord, message, botconfig, os, platform, datetime, one_result, ru_RU.get(), botconfig['accent1'], "=") else: - await help_cmd(bot, discord, message, botconfig, os, platform, datetime, one_result, en_US.get(), botconfig['accent1']) - if message.content.startswith(botconfig['prefix'] + 'state'): + await help_cmd(bot, discord, message, botconfig, os, platform, datetime, one_result, en_US.get(), botconfig['accent1'], "=") + if message.content.startswith(botconfig['prefix'] + 'state') or message.content.startswith(guild_result[6] + 'state'): await state_cmd(bot, discord, sqlite3, message, botconfig, os, platform, datetime, one_result, localization, embed_color, connection, cursor, cpuinfo, psutil) - if message.content.startswith(botconfig['prefix'] + 'eval'): + if message.content.startswith(botconfig['prefix'] + 'eval' or message.content.startswith(guild_result[6] + 'eval')): await eval_cmd(bot, discord, message, botconfig, os, platform, datetime, one_result, localization, en_US, guild_result, intents, embed_color) - if message.content.startswith(botconfig['prefix'] + 'guilds'): + if message.content.startswith(botconfig['prefix'] + 'guilds' or message.content.startswith(guild_result[6] + 'guilds')): await guilds_cmd(bot, discord, message, botconfig, os, platform, datetime, one_result, localization, guild_result, intents, embed_color) - if message.content.startswith(botconfig['prefix'] + 'db'): + if message.content.startswith(botconfig['prefix'] + 'db' or message.content.startswith(guild_result[6] + 'db')): await db_cmd(bot, discord, message, botconfig, os, platform, datetime, one_result, localization, connection, cursor) if message.content.startswith(botconfig['prefix'] + 'clock'): await eval_cmd(bot, discord, message, botconfig, os, platform, datetime, one_result, localization, en_US, guild_result, intents, embed_color) - if message.content.startswith(botconfig['prefix'] + 'settings'): - await settings_cmd(bot, discord, message, botconfig, os, platform, datetime, one_result, localization, unix_time_millis, embed_color) - if message.content.startswith(botconfig['prefix'] + 'set'): + if message.content.startswith(botconfig['prefix'] + 'settings') or message.content.startswith(guild_result[6] + 'settings'): + await settings_cmd(bot, discord, message, botconfig, os, platform, datetime, one_result, localization, unix_time_millis, embed_color, guild_result, prefix) + if message.content.startswith(botconfig['prefix'] + 'set') or message.content.startswith(guild_result[6] + 'set'): + args = message.content.split(" "); try: - args = message.content.split(); if args[1] == "-l": await settings.set_bot_language(bot, discord, message, botconfig, os, platform, datetime, one_result, args, connection, cursor, unix_time_millis) if args[1] == "-tz": await settings.set_timezone(bot, discord, message, botconfig, os, platform, datetime, one_result, args, connection, cursor, localization, unix_time_millis) if args[1] == "-mc": - await settings.switch_msgcounter(bot, discord, message, botconfig, os, platform, datetime, one_result, args, connection, cursor, localization, unix_time_millis,guild_result) + await settings.switch_msgcounter(bot, discord, message, botconfig, os, platform, datetime, one_result, args, connection, cursor, localization, unix_time_millis, guild_result) if args[1] == "-ec": await settings.set_embed_color(bot, discord, message, botconfig, os, platform, datetime, one_result, args, connection, cursor, localization, unix_time_millis, embed_color, guild_result) - if args[1] == "-welcm": - await settings.set_welcome_message(bot, discord, message, botconfig, os, platform, datetime, one_result, args, connection, cursor, localization, unix_time_millis, embed_color) - if args[1] == "-byem": - await settings.set_goodbye_message(bot, discord, message, botconfig, os, platform, datetime, one_result, args, connection, cursor, localization, unix_time_millis, embed_color) + if args[1] == "-pfx": + await settings.set_prefix(bot, discord, message, botconfig, os, platform, datetime, one_result, args, connection, cursor, localization, unix_time_millis, embed_color, guild_result, prefix) + if args[1] == "-lvs": + await settings.switch_lvlsystem(bot, discord, message, botconfig, os, platform, datetime, one_result, args, connection, cursor, localization, unix_time_millis, embed_color, guild_result, prefix) + if args[1] == "-wl_msg": + await settings.set_welcome_message(bot, discord, message, botconfig, os, platform, datetime, one_result, args, connection, cursor, localization, unix_time_millis, embed_color, guild_result, prefix) + if args[1] == "-gb_msg": + await settings.set_goodbye_message(bot, discord, message, botconfig, os, platform, datetime, one_result, args, connection, cursor, localization, unix_time_millis, embed_color, guild_result, prefix) else: return - except: - pass - if message.content.startswith(botconfig['prefix'] + 'profile'): + except Exception as e: + print(e) + if message.content.startswith(botconfig['prefix'] + 'profile') or message.content.startswith(guild_result[6] + 'profile'): args = message.content.split(); try: if args[1] == "-u": @@ -390,47 +412,47 @@ async def on_message(message): pass except Exception as e: print(e) - await profile.get_help(bot, discord, message, botconfig, platform, os, datetime, one_result, localization, args, unix_time_millis, connection, cursor, embed_color) - if message.content.startswith(botconfig['prefix'] + 'tnews'): + await profile.get_help(bot, discord, message, botconfig, platform, os, datetime, one_result, localization, args, unix_time_millis, connection, cursor, embed_color, prefix) + if message.content.startswith(botconfig['prefix'] + 'tnews') or message.content.startswith(guild_result[6] + 'tnews'): args = message.content.split(); await tnews.get_tnews(bot, discord, message, botconfig, platform, os, datetime, one_result, localization, args, unix_time_millis, connection, cursor, embed_color) if message.content.startswith(botconfig['prefix'] + 'blacklist'): - args = message.content.split(); + args = message.content.split(" "); try: if args[1] == "-ag": await blacklist.add_guild_to_blacklist(bot, discord, message, botconfig, platform, os, datetime, one_result, localization, args, unix_time_millis, connection, cursor) except Exception as e: print(e) - if message.content.startswith(botconfig['prefix'] + 'photo'): - await photo_cmd(bot, discord, message, botconfig, os, platform, datetime, one_result, localization, unix_time_millis, unsplash, time_diff, bot_data_result, cursor, connection, embed_color, reddit) - if message.content.startswith(botconfig['prefix'] + 'calc'): - await calc_cmd(bot, discord, message, botconfig, os, platform, datetime, one_result, localization, numexpr) - if message.content.startswith(botconfig['prefix'] + 'feedback'): - await feedback_cmd(bot, discord, message, botconfig, os, platform, datetime, one_result, localization, embed_color) - if message.content.startswith(botconfig['prefix'] + 'weather'): + if message.content.startswith(botconfig['prefix'] + 'photo') or message.content.startswith(guild_result[6] + 'photo'): + await photo_cmd(bot, discord, message, botconfig, os, platform, datetime, one_result, localization, unix_time_millis, unsplash, time_diff, bot_data_result, cursor, connection, embed_color, reddit, prefix) + if message.content.startswith(botconfig['prefix'] + 'calc') or message.content.startswith(guild_result[6] + 'calc'): + await calc_cmd(bot, discord, message, botconfig, os, platform, datetime, one_result, localization, numexpr, prefix) + if message.content.startswith(botconfig['prefix'] + 'feedback') or message.content.startswith(guild_result[6] + 'feedback'): + await feedback_cmd(bot, discord, message, botconfig, os, platform, datetime, one_result, localization, embed_color, prefix) + if message.content.startswith(botconfig['prefix'] + 'weather') or message.content.startswith(guild_result[6] + 'weather'): await weather_cmd(bot, discord, sqlite3, message, botconfig, os, platform, datetime, one_result, localization, embed_color, requests) - if message.content.startswith(botconfig['prefix'] + '8ball') or message.content.startswith(botconfig['prefix'] + 'crystball'): + if message.content.startswith(botconfig['prefix'] + '8ball') or message.content.startswith(botconfig['prefix'] + 'crystball') or message.content.startswith(guild_result[6] + '8ball') or message.content.startswith(guild_result[6] + 'crystball'): await crystball_cmd(bot, discord, sqlite3, message, botconfig, os, platform, datetime, one_result, localization, embed_color, requests) - if message.content.startswith(botconfig['prefix'] + 'post'): - await post_cmd(bot, discord, message, botconfig, platform, os, datetime, one_result, localization, unix_time_millis, embed_color) - if message.content.startswith(botconfig['prefix'] + 'info'): + if message.content.startswith(botconfig['prefix'] + 'post') or message.content.startswith(guild_result[6] + 'post'): + await post_cmd(bot, discord, message, botconfig, platform, os, datetime, one_result, localization, unix_time_millis, embed_color, prefix) + if message.content.startswith(botconfig['prefix'] + 'info') or message.content.startswith(guild_result[6] + 'info'): await info_cmd(bot, discord, message, botconfig, platform, os, datetime, one_result, localization, embed_color) - if message.content.startswith(botconfig['prefix'] + 'codec'): + if message.content.startswith(botconfig['prefix'] + 'codec') or message.content.startswith(guild_result[6] + 'codec'): args = message.content.split(); try: if args[1] == "-d": - await codec.decoder(bot, discord, message, botconfig, os, platform, datetime, one_result, localization, embed_color, args, binary) + await codec.decoder(bot, discord, message, botconfig, os, platform, datetime, one_result, localization, embed_color, args, binary, prefix) if args[1] == "-e": - await codec.encoder(bot, discord, message, botconfig, os, platform, datetime, one_result, localization, embed_color, args, binary) + await codec.encoder(bot, discord, message, botconfig, os, platform, datetime, one_result, localization, embed_color, args, binary, prefix) except Exception as e: - await codec.get_help(bot, discord, message, botconfig, os, platform, datetime, one_result, localization, embed_color) + await codec.get_help(bot, discord, message, botconfig, os, platform, datetime, one_result, localization, embed_color, prefix) print(e) - if message.content.startswith(botconfig['prefix'] + 'poll'): - await poll_cmd(bot, discord, message, botconfig, platform, os, datetime, one_result, localization, unix_time_millis, embed_color, connection, cursor) - if message.content.startswith(botconfig['prefix'] + 'rep'): - await rep_cmd(bot, discord, message, botconfig, platform, os, datetime, one_result, localization, embed_color, connection, cursor) + if message.content.startswith(botconfig['prefix'] + 'poll') or message.content.startswith(guild_result[6] + 'poll'): + await poll_cmd(bot, discord, message, botconfig, platform, os, datetime, one_result, localization, unix_time_millis, embed_color, connection, cursor, prefix) + if message.content.startswith(botconfig['prefix'] + 'rep') or message.content.startswith(guild_result[6] + 'rep'): + await rep_cmd(bot, discord, message, botconfig, platform, os, datetime, one_result, localization, embed_color, connection, cursor, prefix) except Exception as e: - if message.content.startswith(botconfig['prefix']): + if message.content.startswith(botconfig['prefix']) or message.content.startswith(guild_result[6]): exc_type, exc_value, exc_tb = sys.exc_info() ex = traceback.format_exception(exc_type, exc_value, exc_tb) await logging.traceback_logger(bot, discord, message, one_result, guild_result, connection, cursor, unix_time_millis, botconfig, bot_data_result, ex, e) diff --git a/discord_bot/d_commands/calc.py b/discord_bot/d_commands/calc.py index 0b1656a..6189a7c 100644 --- a/discord_bot/d_commands/calc.py +++ b/discord_bot/d_commands/calc.py @@ -1,6 +1,6 @@ -async def calc_cmd(bot, discord, message, botconfig, os, platform, datetime, one_result, localization, numexpr): +async def calc_cmd(bot, discord, message, botconfig, os, platform, datetime, one_result, localization, numexpr, prefix): args = message.content.split(); - no_args = discord.Embed(title=localization[1][9][0], description=localization[1][9][4], color=botconfig['accent1']) + no_args = discord.Embed(title=localization[1][9][0], description=str(localization[1][9][4]).format(prefix), color=botconfig['accent1']) no_args.add_field(name=localization[1][9][6], value=localization[1][9][7], inline=False) if " ".join(args[1:]) == "" or " ".join(args[1:]) == " " or " ".join(args[1:]) == None: return await message.channel.send(embed=no_args) @@ -11,6 +11,6 @@ async def calc_cmd(bot, discord, message, botconfig, os, platform, datetime, one except Exception as e: result = localization[1][9][3] + str(e) finally: - calc_content.add_field(name=localization[1][9][2], value="```" + result + "```", inline=False) + calc_content.add_field(name=localization[1][9][2], value="```" + result + "```", inline=False) calc_content.add_field(name=localization[1][9][6], value=localization[1][9][7], inline=False) await message.channel.send(embed=calc_content) diff --git a/discord_bot/d_commands/codec.py b/discord_bot/d_commands/codec.py index ae4e214..ff13d25 100644 --- a/discord_bot/d_commands/codec.py +++ b/discord_bot/d_commands/codec.py @@ -1,9 +1,9 @@ import base64 import binascii -async def decoder(bot, discord, message, botconfig, os, platform, datetime, one_result, localization, embed_color, args, binary): +async def decoder(bot, discord, message, botconfig, os, platform, datetime, one_result, localization, embed_color, args, binary, prefix): if " ".join(args[2:]) == "" or " ".join(args[2:]) == " " or " ".join(args[2:]) == None: - no_args = discord.Embed(title=localization[1][14][0], description=localization[1][14][8], color=embed_color) + no_args = discord.Embed(title=localization[1][14][0], description=str(localization[1][14][8]).format(prefix), color=embed_color) return await message.channel.send(embed=no_args) decoder_content = discord.Embed(title=localization[1][14][0], description=localization[1][14][1] + "\n\n" + localization[1][14][3], color=embed_color) msg = await message.channel.send(embed=decoder_content) @@ -48,9 +48,9 @@ async def on_reaction_add(reaction, user): decoder_result_content.add_field(name=str(localization[1][14][4]), value='```' + str(result) + '```', inline=True) await msg.edit(embed=decoder_result_content) -async def encoder(bot, discord, message, botconfig, os, platform, datetime, one_result, localization, embed_color, args, binary): +async def encoder(bot, discord, message, botconfig, os, platform, datetime, one_result, localization, embed_color, args, binary, prefix): if " ".join(args[2:]) == "" or " ".join(args[2:]) == " " or " ".join(args[2:]) == None: - no_args = discord.Embed(title=localization[1][14][0], description=localization[1][14][8], color=embed_color) + no_args = discord.Embed(title=localization[1][14][0], description=str(localization[1][14][8]).format(prefix), color=embed_color) return await message.channel.send(embed=no_args) decoder_content = discord.Embed(title=localization[1][14][0], description=localization[1][14][2] + "\n\n" + localization[1][14][3], color=embed_color) msg = await message.channel.send(embed=decoder_content) @@ -109,6 +109,6 @@ async def on_reaction_add(reaction, user): await msg.edit(content=str('```' + str(result) + '```'), embed=decoder_result_content) except: await msg.edit(content='', embed=decoder_result_content) -async def get_help(bot, discord, message, botconfig, os, platform, datetime, one_result, localization, embed_color): - help_content = discord.Embed(title=localization[1][14][0], description=localization[1][14][5], color=embed_color) +async def get_help(bot, discord, message, botconfig, os, platform, datetime, one_result, localization, embed_color, prefix): + help_content = discord.Embed(title=localization[1][14][0], description=str(localization[1][14][5]).format(prefix), color=embed_color) await message.channel.send(embed=help_content) \ No newline at end of file diff --git a/discord_bot/d_commands/feedback.py b/discord_bot/d_commands/feedback.py index 6daedea..d528bde 100644 --- a/discord_bot/d_commands/feedback.py +++ b/discord_bot/d_commands/feedback.py @@ -1,10 +1,10 @@ -async def feedback_cmd(bot, discord, message, botconfig, os, platform, datetime, one_result, localization, embed_color): +async def feedback_cmd(bot, discord, message, botconfig, os, platform, datetime, one_result, localization, embed_color, prefix): args = message.content.split(); - no_args = discord.Embed(title=localization[1][10][0], description=localization[1][10][3], color=embed_color) + no_args = discord.Embed(title=localization[1][10][0], description=str(localization[1][10][3]).format(prefix), color=embed_color) if " ".join(args[1:]) == "" or " ".join(args[1:]) == " " or " ".join(args[1:]) == None: return await message.channel.send(embed=no_args) if message.author.id != int(botconfig['owner']): - feedback_content = discord.Embed(title=localization[1][10][0], description=localization[1][10][2], color=embed_color) + feedback_content = discord.Embed(title=localization[1][10][0], description=str(localization[1][10][2]), color=embed_color) new_message_content = discord.Embed(title='Feedback', description=message.author.name + "#" + str(message.author.discriminator) + ": \"" + " ".join(args[1:]) + "\"", color=embed_color) new_message_content.add_field(name="Channel ID", value=str(message.channel.id), inline=True) new_message_content.add_field(name="User ID", value=str(message.author.id), inline=True) diff --git a/discord_bot/d_commands/help.py b/discord_bot/d_commands/help.py index e39a7ae..1d75d51 100644 --- a/discord_bot/d_commands/help.py +++ b/discord_bot/d_commands/help.py @@ -1,39 +1,29 @@ import random -async def help_cmd(bot, discord, message, botconfig, platform, os, datetime, - one_result, localization, embed_color): +async def help_cmd(bot, discord, message, botconfig, platform, os, datetime, one_result, localization, embed_color, guild_result): if localization[0] == "Russian": tips = [ 'Для просмотра авторской информационной программы "Новости Тинеликса" достаточно написать команду `tnews`?', 'Все наши ссылки находятся в `info`?', 'Узнать погоду можно в `weather`?', 'Просмотреть рандомные фото можно в `photo`? Вдруг пригодится поставить обои на свой рабочий стол?', - 'Что в версии 01R5 (9 января 2020 г.) появилась команда `codec` для зашифровки и расшифровки текста?', - 'Зайти на наш саппорт-сервер можно по [ссылке](https://discord.gg/HAt6K2QuJU)' + 'Что в версии 01R5 (9 января 2020 г.) появилась команда `codec` для зашифровки и расшифровки текста?' ] else: tips = ['All our links on `info` command'] + try: + if guild_result[6] == botconfig['prefix']: + custom_prefix = "" + else: + custom_prefix = " `" + guild_result[6] + "`" + except Exception as e: + print(e) lucky_num = random.randint(0, len(tips) - 1) - - help_content = discord.Embed(description=str(botconfig['name'] + localization[1][0][0]).format( - botconfig['prefix'], tips[lucky_num]), - color=embed_color) - help_content.add_field( - name=str(localization[1][0][1][0]), - value=str(localization[1][0][1][1]), - inline=True) - help_content.add_field( - name=str(localization[1][0][2][0]), - value=str(localization[1][0][2][1]), - inline=True) - help_content.add_field( - name=str(localization[1][0][3][0]), - value=str(localization[1][0][3][1]), - inline=True) - help_content.add_field( - name=str(localization[1][0][4][0]), - value=str(localization[1][0][4][1]), - inline=True) + help_content = discord.Embed(description=str(botconfig['name'] + localization[1][0][0]).format(botconfig['prefix'], custom_prefix, tips[lucky_num]),color=embed_color) + help_content.add_field(name=str(localization[1][0][1][0]),value=str(localization[1][0][1][1]),inline=True) + help_content.add_field(name=str(localization[1][0][2][0]),value=str(localization[1][0][2][1]),inline=True) + help_content.add_field(name=str(localization[1][0][3][0]),value=str(localization[1][0][3][1]),inline=True) + help_content.add_field(name=str(localization[1][0][4][0]),value=str(localization[1][0][4][1]),inline=True) help_content.set_footer(text='Ver. ' + botconfig['version']) await message.channel.send(embed=help_content) diff --git a/discord_bot/d_commands/info.py b/discord_bot/d_commands/info.py index f7abd37..c71fe62 100644 --- a/discord_bot/d_commands/info.py +++ b/discord_bot/d_commands/info.py @@ -3,7 +3,10 @@ async def info_cmd(bot, discord, message, botconfig, platform, os, datetime, one info_content.add_field(name=str(localization[1][15][0]), value=str(localization[1][15][1]), inline=False) info_content.add_field(name=str(localization[1][15][2]), value=str("Python with discord.py library"), inline=True) info_content.add_field(name=str(localization[1][15][3]), value="Tinelix (`" + bot.get_user(int(botconfig['owner'])).name + "#" + str(bot.get_user(int(botconfig['owner'])).discriminator) + "`)", inline=True) - info_content.add_field(name=str(localization[1][15][4]), value=str(localization[1][15][5]), inline=True) - info_content.add_field(name=str(localization[1][15][6]), value=str(localization[1][15][7]), inline=True) + if bot.user.id == 785383439196487720: + info_content.add_field(name=str(localization[1][15][4]), value=str(localization[1][15][5]), inline=True) + info_content.add_field(name=str(localization[1][15][6]), value=str(localization[1][15][7]), inline=True) + else: + info_content.add_field(name=str(localization[1][15][6]), value=str(localization[1][15][8]), inline=True) info_content.set_footer(text="© Tinelix, 2020-2021") await message.channel.send(embed=info_content) \ No newline at end of file diff --git a/discord_bot/d_commands/photo.py b/discord_bot/d_commands/photo.py index 55815dc..5484af7 100644 --- a/discord_bot/d_commands/photo.py +++ b/discord_bot/d_commands/photo.py @@ -1,10 +1,10 @@ import random -async def photo_cmd(bot, discord, message, botconfig, os, platform, datetime, one_result, localization, unix_time_millis, unsplash, time_diff, bot_data_result, cursor, connection, embed_color, reddit): +async def photo_cmd(bot, discord, message, botconfig, os, platform, datetime, one_result, localization, unix_time_millis, unsplash, time_diff, bot_data_result, cursor, connection, embed_color, reddit, prefix): args = message.content.split(); try: if " ".join(args[1:]) == "" or " ".join(args[1:]) == " " or " ".join(args[1:]) == None: - no_args = discord.Embed(title=localization[1][8][0], description=localization[1][8][5], color=embed_color) + no_args = discord.Embed(title=localization[1][8][0], description=str(localization[1][8][5]).format(prefix), color=embed_color) return await message.channel.send(embed=no_args) if args[1] == "-u": if time_diff >= 3600000: @@ -75,6 +75,6 @@ async def on_reaction_add(reaction, user): photo_changed.set_image(url=photo.url) await msg.edit(embed=photo_changed) except: - no_args = discord.Embed(title=localization[1][8][0], description=localization[1][8][5], color=embed_color) + no_args = discord.Embed(title=localization[1][8][0], description=str(localization[1][8][5]).format(prefix), color=embed_color) pass return await message.channel.send(embed=no_args) diff --git a/discord_bot/d_commands/poll.py b/discord_bot/d_commands/poll.py index 00c4aa6..fecf5d9 100644 --- a/discord_bot/d_commands/poll.py +++ b/discord_bot/d_commands/poll.py @@ -3,7 +3,7 @@ def remove_outer_symbols(s): right = s.rindex("]", left) return s[:left] + s[left+1:right] + s[right+1:] -async def poll_cmd(bot, discord, message, botconfig, platform, os, datetime, one_result, localization, unix_time_millis, embed_color, connection, cursor): +async def poll_cmd(bot, discord, message, botconfig, platform, os, datetime, one_result, localization, unix_time_millis, embed_color, connection, cursor, prefix): args = message.content.split(" "); args2 = message.content.split("-[]"); parameter_option = "" @@ -39,8 +39,12 @@ async def poll_cmd(bot, discord, message, botconfig, platform, os, datetime, one parameter_option += '-o' for args_index in args2: try: - index = args_str.index('[') + 6 - rindex = args_str.rindex(']') + 7 + if message.content.startswith(botconfig['prefix']): + index = args_str.index('[') + 6 + rindex = args_str.rindex(']') + 7 + elif message.content.startswith(prefix): + index = args_str.index('[') + 5 + len(prefix) + rindex = args_str.rindex(']') + 6 + len(prefix) options_str += remove_outer_symbols(args_index[index:rindex]) options = options_str.split("],[") except: @@ -52,7 +56,7 @@ async def poll_cmd(bot, discord, message, botconfig, platform, os, datetime, one for opt in options: option_str += emoji_number[str(options.index(opt))] + " " + options[options.index(opt)] + "\n" if args[1] == "" or args[1] == None or args[2] == "" or parameter_option != '-o' or options == [] or args[2] == None or endtimeerr == "Error": - no_args = discord.Embed(title=localization[1][16][0], description=localization[1][16][4], color=embed_color) + no_args = discord.Embed(title=localization[1][16][0], description=str(localization[1][16][4]).format(prefix), color=embed_color) return await message.channel.send(embed=no_args) if endtime == 0: no_args = discord.Embed(title=localization[1][16][0], description=localization[1][16][5], color=embed_color) @@ -69,5 +73,5 @@ async def poll_cmd(bot, discord, message, botconfig, platform, os, datetime, one await msg.add_reaction(emoji=emoji) except Exception as e: print(e) - no_args = discord.Embed(title=localization[1][16][0], description=localization[1][16][4], color=embed_color) + no_args = discord.Embed(title=localization[1][16][0], description=str(localization[1][16][4]).format(prefix), color=embed_color) await message.channel.send(embed=no_args) diff --git a/discord_bot/d_commands/post.py b/discord_bot/d_commands/post.py index 2a94f24..61b9cfd 100644 --- a/discord_bot/d_commands/post.py +++ b/discord_bot/d_commands/post.py @@ -1,4 +1,4 @@ -async def post_cmd(bot, discord, message, botconfig, platform, os, datetime, one_result, localization, unix_time_millis, embed_color): +async def post_cmd(bot, discord, message, botconfig, platform, os, datetime, one_result, localization, unix_time_millis, embed_color, prefix): args = message.content.split(" "); guild_community = "" for guild_features in message.guild.features: diff --git a/discord_bot/d_commands/profile.py b/discord_bot/d_commands/profile.py index 598fac4..254cf7f 100644 --- a/discord_bot/d_commands/profile.py +++ b/discord_bot/d_commands/profile.py @@ -122,6 +122,11 @@ async def get_user(bot, discord, message, botconfig, platform, os, datetime, inline=False) except: pass + if a_user.bot == False: + userprofile_content.add_field( + name=str(localization[1][3][15]), + value="**{0}** ({1}/{2})".format(str(one_result[9]), str(one_result[8]), str(((one_result[9]) * (50 + ((one_result[9]) * 10)) * (one_result[9] + 1)))), + inline=False) msg = await message.channel.send(embed=userprofile_content) if str(a_user.avatar_url_as( format=None, static_format="jpeg", size=4096)) != "" or str( @@ -191,6 +196,11 @@ async def on_member_update(before, after): inline=False) except: pass + if a_user.bot == False: + userprofile_changed.add_field( + name=str(localization[1][3][15]), + value="**{0}** ({1}/{2})".format(str(one_result[9]), str(one_result[8]), str(((one_result[9]) * (50 + ((one_result[9]) * 10)) * (one_result[9] + 1)))), + inline=False) await msg.edit(embed=userprofile_changed) @bot.event @@ -206,7 +216,7 @@ async def on_reaction_add(reaction, user): async def get_help(bot, discord, message, botconfig, platform, os, datetime, one_result, localization, args, unix_time_millis, - connection, cursor, embed_color): + connection, cursor, embed_color, prefix): if one_result[3] < 0: your_timezone = "-" + str(-round(one_result[3] / 60 / 60 / 1000, 1)) if one_result[3] > 0: @@ -219,10 +229,10 @@ async def get_help(bot, discord, message, botconfig, platform, os, datetime, msgcounter = str(localization[1][5][3]) profilehelp_content = discord.Embed( title=str(localization[1][5][0]), - description=str(localization[1][5][2]) + msgcounter + ", " + str( + description=str(localization[1][5][2]).format(prefix) + msgcounter + ", " + str( localization[1][5][4]) + your_timezone + str(localization[1][5][5]) + ", " + str(localization[1][5][6]) + "\n\n" + str( - localization[1][5][1]), + localization[1][5][1]).format(prefix), color=embed_color) await message.channel.send(embed=profilehelp_content) diff --git a/discord_bot/d_commands/reputation.py b/discord_bot/d_commands/reputation.py index e69b04c..60e3794 100644 --- a/discord_bot/d_commands/reputation.py +++ b/discord_bot/d_commands/reputation.py @@ -1,8 +1,8 @@ -async def rep_cmd(bot, discord, message, botconfig, platform, os, datetime, one_result, localization, embed_color, connection, cursor): +async def rep_cmd(bot, discord, message, botconfig, platform, os, datetime, one_result, localization, embed_color, connection, cursor, prefix): args = message.content.split(); - rep_err_b = discord.Embed(title=str(localization[1][17][0]), description=str(localization[1][17][2]), color=embed_color) - no_args = discord.Embed(title=localization[1][17][0], color=embed_color) - no_args.add_field(name=localization[1][17][5], value=localization[1][17][6]) + rep_err_b = discord.Embed(title=str(localization[1][17][0]).format(prefix), description=str(localization[1][17][2]), color=embed_color) + no_args = discord.Embed(title=str(localization[1][17][0]).format(prefix), color=embed_color) + no_args.add_field(name=localization[1][17][5], value=str(localization[1][17][6]).format(prefix)) try: if " ".join(args[1]) == "" or " ".join(args[1]) == " " or " ".join(args[1]) == None or args[1].isdigit() == False: return await message.channel.send(embed=no_args) diff --git a/discord_bot/d_commands/set.py b/discord_bot/d_commands/set.py index 51992ba..ac77db1 100644 --- a/discord_bot/d_commands/set.py +++ b/discord_bot/d_commands/set.py @@ -75,10 +75,10 @@ async def on_reaction_add(reaction, user): if reaction.emoji == "🏠" and user.id != bot.user.id: if message.author.guild_permissions.manage_guild == True: try: - guild = [(message.guild.id, guild_result[1], guild_result[2], guild_result[3], 'Disabled', guild_result[5], guild_result[6], guild_result[7], guild_result[8], guild_result[9], guild_result[10], guild_result[11])] + guild = [(message.guild.id, guild_result[1], guild_result[2], guild_result[3], 'Disabled', guild_result[5], guild_result[6], guild_result[7], guild_result[8], guild_result[9], guild_result[10], guild_result[11], guild_result[12])] except: - guild = [(message.guild.id, str(message.guild.region), 1, unix_time_millis(message.created_at), 'Enabled', 'Standart', '=', 'English', 0, '', 0, '')] - cursor.executemany("INSERT OR REPLACE INTO guilds VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);", guild) + guild = [(message.guild.id, str(message.guild.region), 1, unix_time_millis(message.created_at), 'Enabled', 'Standart', '=', 'English', 0, '', 0, '', "Enabled")] + cursor.executemany("INSERT OR REPLACE INTO guilds VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);", guild) connection.commit() await msg.edit(embed=msgcounter_content) else: @@ -104,9 +104,9 @@ async def on_reaction_add(reaction, user): if reaction.emoji == "🏠" and user.id != bot.user.id: if message.author.guild_permissions.manage_guild == True: try: - guild = [(message.guild.id, guild_result[1], guild_result[2], guild_result[3], 'Disabled', guild_result[5], guild_result[6], guild_result[7], guild_result[8], guild_result[9], guild_result[10], guild_result[11])] + guild = [(message.guild.id, guild_result[1], guild_result[2], guild_result[3], 'Disabled', guild_result[5], guild_result[6], guild_result[7], guild_result[8], guild_result[9], guild_result[10], guild_result[11], guild_result[12])] except: - guild = [(message.guild.id, str(message.guild.region), 1, unix_time_millis(message.created_at), 'Disabled', "Standart", "=", 'English', 0, '', 0, '')] + guild = [(message.guild.id, str(message.guild.region), 1, unix_time_millis(message.created_at), 'Disabled', "Standart", "=", 'English', 0, '', 0, '', "Disabled")] cursor.executemany("INSERT OR REPLACE INTO guilds VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);", guild) connection.commit() await msg.edit(embed=msgcounter_content) @@ -131,46 +131,46 @@ async def set_embed_color(bot, discord, message, botconfig, os, platform, dateti if subargs == "red": try: print('test') - guild = [(message.guild.id, one_result[1], guild_result[2], guild_result[3], guild_result[4], "Red", guild_result[6], guild_result[7], guild_result[8], guild_result[9], guild_result[10], guild_result[11])] + guild = [(message.guild.id, one_result[1], guild_result[2], guild_result[3], guild_result[4], "Red", guild_result[6], guild_result[7], guild_result[8], guild_result[9], guild_result[10], guild_result[11], guild_result[12])] except: - guild = [(message.guild.id, str(message.guild.region), 1, unix_time_millis(message.created_at), 'Enabled', "Red", "=", 'English', 0, '', 0, '')] + guild = [(message.guild.id, str(message.guild.region), 1, unix_time_millis(message.created_at), 'Enabled', "Red", "=", 'English', 0, '', 0, '', "Disabled")] if subargs == "orange": try: - guild = [(message.guild.id, one_result[1], guild_result[2], guild_result[3], guild_result[4], "Standart", guild_result[6], guild_result[7], guild_result[8], guild_result[9], guild_result[10], guild_result[11])] + guild = [(message.guild.id, one_result[1], guild_result[2], guild_result[3], guild_result[4], "Standart", guild_result[6], guild_result[7], guild_result[8], guild_result[9], guild_result[10], guild_result[11], guild_result[12])] except: - guild = [(message.guild.id, str(message.guild.region), 1, unix_time_millis(message.created_at), 'Enabled', "Standart", "=", 'English', 0, '', 0, '')] + guild = [(message.guild.id, str(message.guild.region), 1, unix_time_millis(message.created_at), 'Enabled', "Standart", "=", 'English', 0, '', 0, '', "Disabled")] if subargs == "yellow": try: - guild = [(message.guild.id, one_result[1], guild_result[2], guild_result[3], guild_result[4], "Yellow", guild_result[6], guild_result[7], guild_result[8], guild_result[9], guild_result[10], guild_result[11])] + guild = [(message.guild.id, one_result[1], guild_result[2], guild_result[3], guild_result[4], "Yellow", guild_result[6], guild_result[7], guild_result[8], guild_result[9], guild_result[10], guild_result[11], guild_result[12])] except: - guild = [(message.guild.id, str(message.guild.region), 1, unix_time_millis(message.created_at), 'Enabled', "Yellow", "=", 'English', 0, '', 0, '')] + guild = [(message.guild.id, str(message.guild.region), 1, unix_time_millis(message.created_at), 'Enabled', "Yellow", "=", 'English', 0, '', 0, '', "Disabled")] if subargs == "green": try: - guild = [(message.guild.id, one_result[1], guild_result[2], guild_result[3], guild_result[4], "Green", guild_result[6], guild_result[7], guild_result[8], guild_result[9], guild_result[10], guild_result[11])] + guild = [(message.guild.id, one_result[1], guild_result[2], guild_result[3], guild_result[4], "Green", guild_result[6], guild_result[7], guild_result[8], guild_result[9], guild_result[10], guild_result[11], guild_result[12])] except: - guild = [(message.guild.id, str(message.guild.region), 1, unix_time_millis(message.created_at), 'Enabled', "Green", "=", 'English', 0, '', 0, '')] + guild = [(message.guild.id, str(message.guild.region), 1, unix_time_millis(message.created_at), 'Enabled', "Green", "=", 'English', 0, '', 0, '', "Disabled")] if subargs == "skyblue": try: - guild = [(message.guild.id, one_result[1], guild_result[2], guild_result[3], guild_result[4], "Sky-blue", guild_result[6], guild_result[7], guild_result[8], guild_result[9], guild_result[10], guild_result[11])] + guild = [(message.guild.id, one_result[1], guild_result[2], guild_result[3], guild_result[4], "Sky-blue", guild_result[6], guild_result[7], guild_result[8], guild_result[9], guild_result[10], guild_result[11], guild_result[12])] except: - guild = [(message.guild.id, str(message.guild.region), 1, unix_time_millis(message.created_at), 'Enabled', "Sky-blue", "=", 'English', 0, '', 0, '')] + guild = [(message.guild.id, str(message.guild.region), 1, unix_time_millis(message.created_at), 'Enabled', "Sky-blue", "=", 'English', 0, '', 0, '', "Disabled")] if subargs == "blue": try: - guild = [(message.guild.id, one_result[1], guild_result[2], guild_result[3], guild_result[4], "Blue", guild_result[6], guild_result[7], guild_result[8], guild_result[9], guild_result[10], guild_result[11])] + guild = [(message.guild.id, one_result[1], guild_result[2], guild_result[3], guild_result[4], "Blue", guild_result[6], guild_result[7], guild_result[8], guild_result[9], guild_result[10], guild_result[11], guild_result[12])] except: - guild = [(message.guild.id, str(message.guild.region), 1, unix_time_millis(message.created_at), 'Enabled', "Blue", "=", 'English', 0, '', 0, '')] + guild = [(message.guild.id, str(message.guild.region), 1, unix_time_millis(message.created_at), 'Enabled', "Blue", "=", 'English', 0, '', 0, '', "Disabled")] if subargs == "violet": try: - guild = [(message.guild.id, one_result[1], guild_result[2], guild_result[3], guild_result[4], "Violet", guild_result[6], guild_result[7], guild_result[8], guild_result[9], guild_result[10], guild_result[11])] + guild = [(message.guild.id, one_result[1], guild_result[2], guild_result[3], guild_result[4], "Violet", guild_result[6], guild_result[7], guild_result[8], guild_result[9], guild_result[10], guild_result[11], guild_result[12])] except: - guild = [(message.guild.id, str(message.guild.region), 1, unix_time_millis(message.created_at), 'Enabled', "Violet", "=", 'English', 0, '', 0, '')] + guild = [(message.guild.id, str(message.guild.region), 1, unix_time_millis(message.created_at), 'Enabled', "Violet", "=", 'English', 0, '', 0, '', "Disabled")] if subargs == "rose": try: - guild = [(message.guild.id, one_result[1], guild_result[2], guild_result[3], guild_result[4], "Rose", guild_result[6], guild_result[7], guild_result[8], guild_result[9], guild_result[10], guild_result[11])] + guild = [(message.guild.id, one_result[1], guild_result[2], guild_result[3], guild_result[4], "Rose", guild_result[6], guild_result[7], guild_result[8], guild_result[9], guild_result[10], guild_result[11], guild_result[12])] except: - guild = [(message.guild.id, str(message.guild.region), 1, unix_time_millis(message.created_at), 'Enabled', "Rose", "=", 'English', 0, '', 0, '')] + guild = [(message.guild.id, str(message.guild.region), 1, unix_time_millis(message.created_at), 'Enabled', "Rose", "=", 'English', 0, '', 0, '', "Disabled")] try: - cursor.executemany("INSERT OR REPLACE INTO guilds VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);", guild) + cursor.executemany("INSERT OR REPLACE INTO guilds VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);", guild) connection.commit() customecolor_content = discord.Embed(title=str(localization[1][2][7][0]), description=str(localization[1][2][7][6]), color=embed_color) await message.channel.send(embed=customecolor_content) @@ -178,3 +178,151 @@ async def set_embed_color(bot, discord, message, botconfig, os, platform, dateti pass else: return await message.channel.send(embed=nopermerr_content) + +async def set_prefix(bot, discord, message, botconfig, os, platform, datetime, one_result, args, connection, cursor, localization, unix_time_millis, embed_color, guild_result, prefix): + subargs = args[2] + nopermerr_content = discord.Embed(title=str(localization[1][2][5][5]), description=str(localization[1][2][5][4]), color=botconfig['accent2']) + if message.author.guild_permissions.manage_guild == True: + try: + guild = [(message.guild.id, guild_result[1], guild_result[2], guild_result[3], guild_result[4], guild_result[5], subargs, guild_result[7], guild_result[8], guild_result[9], guild_result[10], guild_result[11], guild_result[12])] + except: + guild = [(message.guild.id, str(message.guild.region), 1, unix_time_millis(message.created_at), 'Enabled', "Standart", subargs, 'English', 0, '', 0, '', "Disabled")] + try: + cursor.executemany("INSERT OR REPLACE INTO guilds VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);", guild) + connection.commit() + customprefix_content = discord.Embed(title=str(localization[1][2][8][0]), description=str(localization[1][2][7][6]), color=embed_color) + await message.channel.send(embed=customprefix_content) + except Exception as e: + print(e) + else: + return await message.channel.send(embed=nopermerr_content) + +async def switch_lvlsystem(bot, discord, message, botconfig, os, platform, datetime, one_result, args, connection, cursor, localization, unix_time_millis, embed_color, guild_result, prefix): + subargs = args[2] + nopermerr_content = discord.Embed(title=str(localization[1][2][5][5]), description=str(localization[1][2][5][4]), color=botconfig['accent2']) + if message.author.guild_permissions.manage_guild == True: + if subargs == "on": + try: + guild = [(message.guild.id, guild_result[1], guild_result[2], guild_result[3], guild_result[4], guild_result[5], guild_result[6], guild_result[7], guild_result[8], guild_result[9], guild_result[10], guild_result[11], "Enabled")] + except: + guild = [(message.guild.id, str(message.guild.region), 1, unix_time_millis(message.created_at), 'Enabled', "Standart", botconfig['prefix'], 'English', 0, '', 0, '', "Enabled")] + try: + cursor.executemany("INSERT OR REPLACE INTO guilds VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);", guild) + connection.commit() + levelsys_content = discord.Embed(title=str(localization[1][2][9][0]), description=str(localization[1][2][7][6]), color=embed_color) + await message.channel.send(embed=levelsys_content) + except Exception as e: + print(e) + if subargs == "off": + try: + guild = [(message.guild.id, guild_result[1], guild_result[2], guild_result[3], guild_result[4], guild_result[5], guild_result[6], guild_result[7], guild_result[8], guild_result[9], guild_result[10], guild_result[11], "Disabled")] + except: + guild = [(message.guild.id, str(message.guild.region), 1, unix_time_millis(message.created_at), 'Enabled', "Standart", botconfig['prefix'], 'English', 0, '', 0, '', "Disabled")] + + try: + cursor.executemany("INSERT OR REPLACE INTO guilds VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);", guild) + connection.commit() + levelsys_content = discord.Embed(title=str(localization[1][2][9][0]), description=str(localization[1][2][7][6]), color=embed_color) + await message.channel.send(embed=levelsys_content) + except Exception as e: + print(e) + else: + return await message.channel.send(embed=nopermerr_content) + + +async def set_welcome_message(bot, discord, message, botconfig, os, platform, datetime, one_result, args, connection, cursor, localization, unix_time_millis, embed_color, guild_result, prefix): + subargs = args[2] + msgtext = " ".join(args[3:]) + nopermerr_content = discord.Embed(title=str(localization[1][2][5][5]), description=str(localization[1][2][5][4]), color=botconfig['accent2']) + channel_not_found = discord.Embed(title=str(localization[1][2][10][7]), description=str(localization[1][2][10][8]), color=botconfig['accent2']) + if message.author.guild_permissions.manage_guild == True: + if subargs.isdigit() == True and (msgtext != None or msgtext != "" or msgtext != " "): + search_result = 0 + for channel in message.guild.channels: + if channel.id == int(subargs): + search_result += 1 + if search_result >= 1: + try: + guild = [(message.guild.id, guild_result[1], guild_result[2], guild_result[3], guild_result[4], guild_result[5], guild_result[6], guild_result[7], int(subargs), msgtext, guild_result[10], guild_result[11], guild_result[12])] + except: + guild = [(message.guild.id, str(message.guild.region), 1, unix_time_millis(message.created_at), 'Enabled', "Standart", botconfig['prefix'], 'English', int(subargs), msgtext, 0, '', "Disabled")] + try: + cursor.executemany("INSERT OR REPLACE INTO guilds VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);", guild) + connection.commit() + welcomemsg_content = discord.Embed(title=str(localization[1][2][10][0]), description=str(localization[1][2][7][6]), color=embed_color) + await message.channel.send(embed=welcomemsg_content) + except Exception as e: + print(e) + else: + await message.channel.send(embed=channel_not_found) + + elif subargs == "off": + try: + guild = [(message.guild.id, guild_result[1], guild_result[2], guild_result[3], guild_result[4], guild_result[5], guild_result[6], guild_result[7], 0, '', guild_result[10], guild_result[11], guild_result[12])] + except: + guild = [(message.guild.id, str(message.guild.region), 1, unix_time_millis(message.created_at), 'Enabled', "Standart", botconfig['prefix'], 'English', 0, '', 0, '', "Disabled")] + + try: + cursor.executemany("INSERT OR REPLACE INTO guilds VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);", guild) + connection.commit() + welcomemsg_content = discord.Embed(title=str(localization[1][2][10][0]), description=str(localization[1][2][7][6]), color=embed_color) + await message.channel.send(embed=welcomemsg_content) + except Exception as e: + print(e) + else: + welcomemsg_content = discord.Embed(title=str(localization[1][2][10][0]), color=embed_color) + welcomemsg_content.add_field(name=str(localization[1][2][10][1]), value=str(localization[1][2][10][2]), inline=True) + welcomemsg_content.add_field(name=str(localization[1][2][10][3]), value=str(localization[1][2][10][4]).format(prefix).replace('╭', '{').replace('╮', '}'), inline=False) + welcomemsg_content.add_field(name=str(localization[1][2][10][5]), value=str(localization[1][2][10][6]), inline=True) + return await message.channel.send(embed=welcomemsg_content) + else: + return await message.channel.send(embed=nopermerr_content) + +async def set_goodbye_message(bot, discord, message, botconfig, os, platform, datetime, one_result, args, connection, cursor, localization, unix_time_millis, embed_color, guild_result, prefix): + subargs = args[2] + msgtext = " ".join(args[3:]) + nopermerr_content = discord.Embed(title=str(localization[1][2][5][5]), description=str(localization[1][2][5][4]), color=botconfig['accent2']) + channel_not_found = discord.Embed(title=str(localization[1][2][10][7]), description=str(localization[1][2][10][8]), color=botconfig['accent2']) + if message.author.guild_permissions.manage_guild == True: + if subargs.isdigit() == True and (msgtext != None or msgtext != "" or msgtext != " "): + search_result = 0 + for channel in message.guild.channels: + if channel.id == int(subargs): + search_result += 1 + if search_result >= 1: + #msgtext.format(user = member.name, user_with_discrim = str(member.name) + "#" + str(member.discriminator), mention = "<@" + member.id + ">") + try: + guild = [(message.guild.id, guild_result[1], guild_result[2], guild_result[3], guild_result[4], guild_result[5], guild_result[6], guild_result[7], guild_result[8], guild_result[9], int(subargs), msgtext, guild_result[12])] + except: + guild = [(message.guild.id, str(message.guild.region), 1, unix_time_millis(message.created_at), 'Enabled', "Standart", botconfig['prefix'], 'English', 0, '', int(subargs), msgtext, "Disabled")] + try: + cursor.executemany("INSERT OR REPLACE INTO guilds VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);", guild) + connection.commit() + welcomemsg_content = discord.Embed(title=str(localization[1][2][10][0]), description=str(localization[1][2][7][6]), color=embed_color) + await message.channel.send(embed=welcomemsg_content) + except Exception as e: + print(e) + else: + await message.channel.send(embed=channel_not_found) + + elif subargs == "off": + try: + guild = [(message.guild.id, guild_result[1], guild_result[2], guild_result[3], guild_result[4], guild_result[5], guild_result[6], guild_result[7], 0, '', guild_result[10], guild_result[11], guild_result[12])] + except: + guild = [(message.guild.id, str(message.guild.region), 1, unix_time_millis(message.created_at), 'Enabled', "Standart", botconfig['prefix'], 'English', 0, '', 0, '', "Disabled")] + + try: + cursor.executemany("INSERT OR REPLACE INTO guilds VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);", guild) + connection.commit() + welcomemsg_content = discord.Embed(title=str(localization[1][2][10][0]), description=str(localization[1][2][7][6]), color=embed_color) + await message.channel.send(embed=welcomemsg_content) + except Exception as e: + print(e) + else: + welcomemsg_content = discord.Embed(title=str(localization[1][2][10][0]), color=embed_color) + welcomemsg_content.add_field(name=str(localization[1][2][10][1]), value=str(localization[1][2][10][2]), inline=False) + welcomemsg_content.add_field(name=str(localization[1][2][10][3]), value=str(localization[1][2][10][4]).format(prefix).replace('╭', '{').replace('╮', '}'), inline=False) + welcomemsg_content.add_field(name=str(localization[1][2][10][5]), value=str(localization[1][2][10][6]), inline=False) + return await message.channel.send(embed=welcomemsg_content) + else: + return await message.channel.send(embed=nopermerr_content) \ No newline at end of file diff --git a/discord_bot/d_commands/settings.py b/discord_bot/d_commands/settings.py index ee73a6d..4b82e88 100644 --- a/discord_bot/d_commands/settings.py +++ b/discord_bot/d_commands/settings.py @@ -1,4 +1,4 @@ -async def settings_cmd(bot, discord, message, botconfig, os, platform, datetime, one_result, localization, unix_time_millis, embed_color): +async def settings_cmd(bot, discord, message, botconfig, os, platform, datetime, one_result, localization, unix_time_millis, embed_color, guild_result, prefix): if one_result[3] < 0: your_timezone = "-" + str(-round(one_result[3] / 60 / 60 / 1000, 1)) if one_result[3] > 0: @@ -6,27 +6,40 @@ async def settings_cmd(bot, discord, message, botconfig, os, platform, datetime, if one_result[3] == 0: your_timezone = "" dbregdate_ms = one_result[4] + prefix = guild_result[6] today_ms = int(unix_time_millis(datetime.datetime.utcnow()) + one_result[3]) today = datetime.datetime.fromtimestamp((today_ms) / 1000) # 25200000 for UTC+7 dbregdate = datetime.datetime.fromtimestamp(dbregdate_ms / 1000) settings_content = discord.Embed(title=str(localization[1][2][0]), description=str(localization[1][2][1]), color=embed_color) - botlanguage_content = discord.Embed(title=str(localization[1][2][2][0]), description=str(localization[1][2][2][1]), color=embed_color) + botlanguage_content = discord.Embed(title=str(localization[1][2][2][0]), description=str(localization[1][2][2][1]).format(prefix), color=embed_color) timezone_content = discord.Embed(title=str(localization[1][2][3][0]), description=str(localization[1][2][3][1]) + ": " + today.strftime("%Y-%m-%d **%H:%M:%S**") + " (UTC" + your_timezone + ")", color=embed_color) timezone_content.add_field(name=str(localization[1][2][3][2]), value=str(localization[1][2][3][3]), inline=True) - timezone_content.add_field(name=str(localization[1][2][3][4]), value=str(localization[1][2][3][5]), inline=True) + timezone_content.add_field(name=str(localization[1][2][3][4]), value=str(localization[1][2][3][5]).format(prefix), inline=True) timezone_content.set_footer(text=str(localization[1][2][3][6])) msgcount_content = discord.Embed(title=str(localization[1][2][6][0]), description=str(localization[1][2][6][1]) + dbregdate.strftime("%Y-%m-%d") + ": **" + str(one_result[2]) + "**" + str(localization[1][2][6][2]), color=embed_color) msgcount_content.add_field(name=str(localization[1][2][6][3]), value=str(localization[1][2][6][4]), inline=True) - msgcount_content.add_field(name=str(localization[1][2][6][5]), value=str(localization[1][2][6][6]) , inline=True) + msgcount_content.add_field(name=str(localization[1][2][6][5]), value=str(localization[1][2][6][6]).format(prefix), inline=True) customecolor_content = discord.Embed(title=str(localization[1][2][7][0]), color=embed_color) customecolor_content.add_field(name=str(localization[1][2][7][1]), value=str(localization[1][2][7][2]), inline=True) - customecolor_content.add_field(name=str(localization[1][2][7][3]), value=str(localization[1][2][7][4]), inline=True) - + customecolor_content.add_field(name=str(localization[1][2][7][3]), value=str(localization[1][2][7][4]).format(prefix), inline=True) + customprefix_content = discord.Embed(title=str(localization[1][2][8][0]), color=embed_color) + customprefix_content.add_field(name=str(localization[1][2][8][1]), value="`" + botconfig['prefix'] + "`", inline=True) + customprefix_content.add_field(name=str(localization[1][2][8][2]), value=str(localization[1][2][8][3]).format(prefix), inline=True) + levelsystem_content = discord.Embed(title=str(localization[1][2][9][0]), color=embed_color) + levelsystem_content.add_field(name=str(localization[1][2][9][1]), value=str(localization[1][2][9][2]), inline=True) + levelsystem_content.add_field(name=str(localization[1][2][9][3]), value=str(localization[1][2][9][4]).format(prefix), inline=True) + welcomemsg_content = discord.Embed(title=str(localization[1][2][10][0]), color=embed_color) + welcomemsg_content.add_field(name=str(localization[1][2][10][1]), value=str(localization[1][2][10][2]), inline=False) + welcomemsg_content.add_field(name=str(localization[1][2][10][3]), value=str(localization[1][2][10][4]).format(prefix).replace('╭', '{').replace('╮', '}'), inline=False) + welcomemsg_content.add_field(name=str(localization[1][2][10][5]), value=str(localization[1][2][10][6]), inline=False) msg = await message.channel.send(embed=settings_content) await msg.add_reaction(emoji="🗣️") await msg.add_reaction(emoji="🕓") await msg.add_reaction(emoji="🗨️") await msg.add_reaction(emoji="🌈") + await msg.add_reaction(emoji="🚩") + await msg.add_reaction(emoji="🏆") + await msg.add_reaction(emoji="👋") @bot.event async def on_reaction_add(reaction, user): channel = reaction.message.channel @@ -38,3 +51,9 @@ async def on_reaction_add(reaction, user): await msg.edit(embed=msgcount_content) if reaction.emoji == "🌈" and user.id != bot.user.id: await msg.edit(embed=customecolor_content) + if reaction.emoji == "🚩" and user.id != bot.user.id: + await msg.edit(embed=customprefix_content) + if reaction.emoji == "🏆" and user.id != bot.user.id: + await msg.edit(embed=levelsystem_content) + if reaction.emoji == "👋" and user.id != bot.user.id: + await msg.edit(embed=welcomemsg_content) diff --git a/discord_bot/d_commands/state.py b/discord_bot/d_commands/state.py index 8de3f19..53cd8bf 100644 --- a/discord_bot/d_commands/state.py +++ b/discord_bot/d_commands/state.py @@ -1,6 +1,4 @@ async def state_cmd(bot, discord, sqlite3, message, botconfig, os, platform, datetime, one_result, localization, embed_color, connection, cursor, cpuinfo, psutil): - data_collecting_content = discord.Embed(title=str(localization[1][1][0]), description="**" + str(localization[1][1][1]) + ":** " + str(round(bot.latency * 1000, 2)) + str(localization[1][1][2]) + "\n\n" + str(localization[1][1][18]), color=embed_color) - msg = await message.channel.send(embed=data_collecting_content) usersdb = cursor.execute('SELECT * FROM users').rowcount usersdb_count = cursor.fetchall() guildsdb = cursor.execute('SELECT * FROM guilds').rowcount @@ -21,10 +19,11 @@ async def state_cmd(bot, discord, sqlite3, message, botconfig, os, platform, dat if psutil.virtual_memory().total < 1024: ram_total = str(round(psutil.virtual_memory().total / 1024, 2)) + localization[1][1][14] - elif psutil.virtual_memory().total < 1048576 and psutil.virtual_memory().total >= 1024: + elif psutil.virtual_memory().total < 1048576 and psutil.virtual_memory().total >= 1024: ram_total = str(round(psutil.virtual_memory().total / 1024 / 1024, 2)) + localization[1][1][15] else: ram_total = str(round(psutil.virtual_memory().total / 1024 / 1024 / 1024, 2)) + localization[1][1][16] + state_content = discord.Embed(title=str(localization[1][1][0]), description="**" + str(localization[1][1][1]) + ":** " + str(round(bot.latency * 1000, 2)) + str(localization[1][1][2]), color=embed_color) state_content.add_field(name=str(localization[1][1][3]), value=platform.uname()[0] + " " + platform.uname()[2] + " (" + platform.uname()[3] + ")", inline=False) state_content.add_field(name=str(localization[1][1][4]), value=str(cpuinfo.get_cpu_info()['brand_raw']) + " (" + cores_amount + ", " + str(round(cpuinfo.get_cpu_info()['hz_advertised'][0] / 1000000, 2)) + localization[1][1][12] + ")", inline=False) @@ -33,4 +32,4 @@ async def state_cmd(bot, discord, sqlite3, message, botconfig, os, platform, dat state_content.add_field(name=str(localization[1][1][6]), value=platform.python_build()[1], inline=True) state_content.add_field(name=str(localization[1][1][7]), value="**discord.py:** " + discord.__version__ + "\n**SQLite3 library:** " + sqlite3.sqlite_version + "\n**Vision bot:** " + botconfig['version'], inline=True) state_content.add_field(name=str(localization[1][1][8]), value="🏠 " + str(len(bot.guilds)) + " | 👥 " + str(len(bot.users)) + " | 🗃 " + str(len(usersdb_count) + len(guildsdb_count)), inline=True) - await msg.edit(embed=state_content) \ No newline at end of file + await message.channel.send(embed=state_content) \ No newline at end of file diff --git a/discord_bot/d_events/new_level.py b/discord_bot/d_events/new_level.py new file mode 100644 index 0000000..f407e02 --- /dev/null +++ b/discord_bot/d_events/new_level.py @@ -0,0 +1,20 @@ +import random +import math + +async def message_to_xp(bot, discord, message, botconfig, platform, os, datetime, one_result, guild_result, localization, unix_time_millis, embed_color, connection, cursor, prefix): + if len(message.content) > 10: #за каждое сообщение длиной > 10 символов... + expi=one_result[8]+random.randint(5, 40) #к опыту добавляется случайное число + cursor.executemany('UPDATE users SET scores=? where userid=?', [(expi, message.author.id)]) + try: + lvch=expi/(one_result[9] * (50 + (one_result[9] * 10))) + except ZeroDivisionError as zerodivide_err: + lvch=1 + connection.commit() + lv=math.floor(lvch) + print(((one_result[9]) * (50 + ((one_result[9]) * 10))) * (one_result[9] + 1)) + if one_result[9] < lv: + if message.content.startswith(botconfig['prefix']) is False or message.content.startswith(guild_result[6]) is False: + new_level_msg = discord.Embed(title=localization[1][18][0], description=str(localization[1][18][1]).format('<@' + str(message.author.id) + '>', lv), color=embed_color) + await message.channel.send(embed=new_level_msg) + cursor.executemany('UPDATE users SET level=? where userid=?', [(lv, message.author.id)]) + connection.commit() diff --git a/discord_bot/d_events/new_member.py b/discord_bot/d_events/new_member.py index 3fee8b9..d464deb 100644 --- a/discord_bot/d_events/new_member.py +++ b/discord_bot/d_events/new_member.py @@ -1,4 +1,4 @@ -async def autorole(bot, discord, member, botconfig): +async def autorole(bot, discord, member, botconfig, cursor, connection): if member.guild.id == 795532426331422730: new_member_content = discord.Embed(title=member.name + "#" + str(member.discriminator) + " пришел!", description="Привет! Для сохранения безопасной и комфортной атмосферы советуем прочитать правила в <#795532426331422733> и в окне приветствия. Для согласия нажмите на кнопку \"Выполнено\", затем после 10 минут на реакцию ✅.", color=botconfig['accent1']) await bot.get_channel(795621547946934292).send("<@" + str(member.id) + ">") @@ -12,4 +12,40 @@ async def on_reaction_add(reaction, user): await member.add_roles(member.guild.roles[2]) except: new_member_content = discord.Embed(title="Хорошо...", description="А Вы пока подождите админов, чтобы они руками давали роль участника.", color=botconfig['accent1']) - await msg.edit(embed=new_member_content) \ No newline at end of file + await msg.edit(embed=new_member_content) + +async def new_member(bot, discord, member, botconfig, cursor, connection): + cursor.execute("SELECT * FROM guilds WHERE guildid='" + str(member.guild.id) + "';") + guild_result = (cursor.fetchone()) + search_results = 0 + for channel in member.guild.channels: + if channel.id == guild_result[8]: + search_results += 1 + msgtext = guild_result[9] + try: + msgtext_formatted = msgtext.format(user = member.name, user_with_discrim = str(member.name) + "#" + str(member.discriminator), mention = "<@" + str(member.id) + ">") + except: + msgtext_formatted = "" + if search_results == 1 and guild_result[9] != None and guild_result[9] != "" and guild_result[9] != " " and msgtext_formatted != "": + new_member_content = discord.Embed(description=msgtext_formatted, color=botconfig['accent1']) + msg = await bot.get_channel(guild_result[8]).send(embed=new_member_content) + if guild_result is None: + return + +async def member_left(bot, discord, member, botconfig, cursor, connection): + cursor.execute("SELECT * FROM guilds WHERE guildid='" + str(member.guild.id) + "';") + guild_result = (cursor.fetchone()) + search_results = 0 + for channel in member.guild.channels: + if channel.id == guild_result[10]: + search_results += 1 + msgtext = guild_result[11] + try: + msgtext_formatted = msgtext.format(user = member.name, user_with_discrim = str(member.name) + "#" + str(member.discriminator), mention = "<@" + str(member.id) + ">") + except: + msgtext_formatted = "" + if search_results == 1 and guild_result[11] != None and guild_result[11] != "" and guild_result[11] != " " and msgtext_formatted != "": + new_member_content = discord.Embed(description=msgtext_formatted, color=botconfig['accent1']) + msg = await bot.get_channel(guild_result[8]).send(embed=new_member_content) + if guild_result is None: + return \ No newline at end of file diff --git a/discord_bot/d_languages/en_US.py b/discord_bot/d_languages/en_US.py index 934ad54..4824738 100644 --- a/discord_bot/d_languages/en_US.py +++ b/discord_bot/d_languages/en_US.py @@ -1,5 +1,5 @@ import importlib.util -spec = importlib.util.spec_from_file_location("botconfig", "/home/runner/visionbot/discord_bot/discord_botconfig.py") +spec = importlib.util.spec_from_file_location("botconfig", "./discord_bot/discord_botconfig.py") botconfig = importlib.util.module_from_spec(spec) spec.loader.exec_module(botconfig) def get(): @@ -9,7 +9,7 @@ def get(): 'English', # 0 [ # 1 [ # 1.0 - ' - simple and slightly extensible. Developed by Tinelix.\n**Prefix:** `{0}`\n\n**Did you know that...** {1}', # 1.0.0 + ' - simple and slightly extensible. Developed by Tinelix.\n**Prefix:** `{0}`{1}\n\n**Did you know that...** {2}', # 1.0.0 [ # 1.0.1 'General', # 1.0.1.0 '`help`, `state`, `profile`, `feedback`, `info`' # 1.0.1.1 @@ -24,7 +24,7 @@ def get(): ], [ # 1.0.4 'Miscellaneous', # 1.0.4.0 - '`calc` `weather` `codec` `poll`' # 1.0.4.1 + '`calc`, `weather`, `codec`, `poll`' # 1.0.4.1 ], '**Prefix:** ' # 1.0.5 ], @@ -46,15 +46,14 @@ def get(): ' kB', # 1.1.14 ' MB', # 1.1.15 ' GB', # 1.1.16 - ' free', # 1.1.17 - 'Data collection in progress as it may take time.' # 1.1.18 + ' free' # 1.1.17 ], [ # 1.2 'Settings', # 1.2.0 - 'To access the desired setting, click on one of the appropriate reactions.\n\n**🗣️ Bot language**\n**🕓 Timezone**\n**🗨️ Messages count**\n**🌈 Custom embed color**', # 1.2.1 + 'To access the desired setting, click on one of the appropriate reactions.\n\n**🗣️ Bot language**\n**🕓 Timezone**\n**🗨️ Messages count**\n**🌈 Custom embed color**\n🚩 **Custom prefix** (beta)\n🏆 **Level system** (beta)\n👋 **Welcome/goodbye messages** (beta)', # 1.2.1 [ # 1.2.2 'Bot language', # 1.2.2.0 - 'To change the value, enter the commands below.\n\n**🇷🇺 Russian**\n```{0}set -l ru-RU```\n\n**🇺🇸 English**\n```{0}set -l en-US```'.format(prefix) # 1.2.2.1 + 'To change the value, enter the commands below.\n\n**🇷🇺 Russian**\n```{0}set -l ru-RU```\n\n**🇺🇸 English**\n```{0}set -l en-US```' # 1.2.2.1 ], [ # 1.2.3 'Timezone', # 1.2.3.0 @@ -62,7 +61,7 @@ def get(): 'Valid values', # 1.2.3.2 '-120 to 140 (UTC)', # 1.2.3.3 'Example', # 1.2.3.4 - '```{0}set -tz -80\n{0}set -tz 30\n{0}set -tz 55```'.format(prefix), # 1.2.3.5 + '```{0}set -tz -80\n{0}set -tz 30\n{0}set -tz 55```', # 1.2.3.5 '-80 for UTC-8:00, 30 for UTC+3:00 (MSK), 55 for UTC+5:30.' # 1.2.3.6 ], [ # 1.2.4 @@ -92,9 +91,35 @@ def get(): 'Valid values', # 1.2.7.1 '`red`, `orange`, `yellow`, `green`, `skyblue`, `blue`, `violet`, `rose`', # 1.2.7.2 'Example', # 1.2.7.3 - '```{0}set -ec skyblue```'.format(prefix), # 1.2.7.4 + '```{0}set -ec skyblue```', # 1.2.7.4 'Custom embed color (🏠)', # 1.2.7.5 'Changes saved.' # 1.2.7.6 + ], + [ # 1.2.8 + 'Bot prefix', # 1.2.8.0 + 'Default', # 1.2.8.1 + 'Example', # 1.2.8.2 + '```{0}set -pfx v!```', # 1.2.8.3 + 'Changes saved.', # 1.2.8.4 + '**WARNING!** Since you are currently using the latest version of the bot, then, accordingly, this setting may need to be improved.', + ], + [ # 1.2.9 + 'Level system', # 1.2.9.0 + 'Valid values', # 1.2.9.1 + '`on` - enable, `off` - disable', # 1.2.9.2 + 'Example', # 1.2.9.3 + '```{0}set -lvs on```' # 1.2.9.4 + ], + [ # 1.2.10 + 'Welcome/goodbye messages', # 1.2.10.0 + 'Valid values', # 1.2.10.1 + '`[Channel ID] [Text]` - enable or edit\n`off` - disable', # 1.2.10.2 + 'Example', # 1.2.10.3 + '```{0}set -wl_msg 794585820312633354 Hello, ╭user╮!\n{0}set -gb_msg 794585820312633354 Goodbye, ╭user╮!```', # 1.2.10.4 + 'Autoformat', # 1.2.10.5 + '`{user}` - username\n`{user_with_discrim}` - username with discriminator\n`{gn}` - guildname\n`{mention}` - user mention', # 1.2.10.6 + 'Error', # 1.2.10.7 + 'This channel cannot be found on your Discord server.' # 1.2.10.8 ] ], [ # 1.3 @@ -117,7 +142,8 @@ def get(): ], 'Roles ', # 1.3.12 'Date of sending the post message', # 1.3.13 - 'Reputation' # 1.3.14 + 'Reputation', # 1.3.14 + 'Level' # 1.3.15 ], [ # 1.4 'About ', # 1.4.0 @@ -159,8 +185,8 @@ def get(): ], [ # 1.5 'Profile', # 1.5.0 - '`{0}profile -u [ID]` - find out information about the user.\n`{0}profile -g` - find out information about the server'.format(prefix), # 1.5.1 - 'Your parameters (can be changed in `{0}settings`): '.format(prefix), # 1.5.2 + '`{0}profile -u [ID]` - find out information about the user.\n`{0}profile -g` - find out information about the server', # 1.5.1 + 'Your parameters (can be changed in `{0}settings`): ', # 1.5.2 'message counter enabled', # 1.5.3 'UTC', # 1.5.4 ' timezone', # 1.5.5 @@ -190,14 +216,14 @@ def get(): 'Likes', # 1.8.2 'Enough for now!', # 1.8.3 'It will be possible to see more photos in exactly an hour, since the Unsplash API has a limit of no more than 50 requests per hour. We apologize for any inconvenience caused.', # 1.8.4 - '`{0}photo -u` - viewing photos from Unsplash.\n`{0}photo -r` - viewing photos from subreddits.'.format(prefix) + '`{0}photo -u` - viewing photos from Unsplash.\n`{0}photo -r` - viewing photos from subreddits.' # 1.8.5 ], [ # 1.9 'Calculator', # 1.9.0 'Listing', # 1.9.1 'Result', # 1.9.2 'Exception caught!\n', # 1.9.3 - 'You forgot to enter an expression.\n```{0}calc 4 * 58```'.format(prefix), # 1.9.4 + 'You forgot to enter an expression.\n```{0}calc 4 * 58```', # 1.9.4 'In this version of the Calculator you can only perform simple arithmetic operations.', # 1.9.5 'Available characters', # 1.9.7 '`+` - add\n`-` - subtract\n`*` - multiply\n`/` - divide' @@ -206,7 +232,7 @@ def get(): 'Feedback', # 1.10.0 '{0} Bugtracker'.format(name), # 1.10.1 'The author bot will reply shortly, please wait...', # 1.10.2 - 'You forgot to provide arguments.\n\n```{0}feedback Hi!```'.format(prefix), # 1.10.3 + 'You forgot to provide arguments.\n\n```{0}feedback Hi!```', # 1.10.3 'You answered:' # 1.10.4 ], [ # 1.11 @@ -247,27 +273,28 @@ def get(): 'You have to choose the data type to encode into a regular string. The selection is made by clicking on the appropriate reaction.', # 1.14.2 '1️⃣ Base64\n2️⃣ Base32\n3️⃣ Base16\n4️⃣ Binary code', # 1.14.3 'Result', # 1.14.4 - '`{0}codec -d` - decode text\n`{0}codec -e` - encode text'.format(prefix), # 1.14.5 + '`{0}codec -d` - decode text\n`{0}codec -e` - encode text', # 1.14.5 'The text could not be decoded. Invalid data type selected.', # 1.14.6 'Viewing in embed message is not possible.' # 1.14.7 - 'You forgot to enter text.\n\n```{0}codec -e Hello!\n{0}codec -d SGVsbG8h```'.format(prefix) # 1.14.8 + 'You forgot to enter text.\n\n```{0}codec -e Hello!\n{0}codec -d SGVsbG8h```' # 1.14.8 ], [ # 1.15 'About bot', # 1.15.0 '{0} is a simple and extensible bot from Tinelix. This bot is a replacement for the Highflash bot, which was crude enough to run for monitoring bots. But don\'t worry, the Vision bot has (albeit imperfect) integration with the SQlite3 database, when there was only primitive JSON in Highflash. The bot was written from scratch and took into account the mistakes made during the development of the Highflash bot. It develops not only thanks to you, but also to the author (Tinelix) with its productivity. He can ask you the weather, encrypt or decrypt texts, show random and rather interesting photos from Reddit and Unsplash, play Crystal Ball, etc.'.format(name), # 1.15.1 'Written in', # 1.15.2 'Author', # 1.15.3 - 'Bots Monitorings', # 1.15.4 - '[bots.server-discord.com](https://bots.server-discord.com/785383439196487720)\n[BotiCord](https://boticord.top/bot/785383439196487720)\n[Bots for Discord](https://botsfordiscord.com/bot/785383439196487720)\n[top.gg](https://top.gg/bot/785383439196487720)', # 1.15.5 + 'Bots Monitoring', # 1.15.4 + '[bots.server-discord.com](https://bots.server-discord.com/785383439196487720)\n[BotiCord](https://boticord.top/bot/785383439196487720)\n[Bots for Discord](https://botsfordiscord.com/bot/785383439196487720)', # 1.15.5 'Links', # 1.15.6 - '[Invite](https://discord.com/api/oauth2/authorize?client_id=785383439196487720&permissions=8&scope=bot)\n[GitHub](https://github.com/tinelix/visionbot)\n[Our support server](https://discord.gg/HAt6K2QuJU)' # 1.15.7 + '[Invite](https://discord.com/api/oauth2/authorize?client_id=785383439196487720&permissions=8&scope=bot)\n[GitHub](https://github.com/tinelix/visionbot)\n[Our support server](https://discord.gg/HAt6K2QuJU)', # 1.15.7 + '[Invite](https://discord.com/oauth2/authorize?client_id=769515555765616690&permissions=8&scope=bot)\n[GitHub](https://github.com/tinelix/visionbot)\n[Our support server](https://discord.gg/HAt6K2QuJU)' ], [ # 1.16 'Polling', # 1.16.0 '', # 1.16.1 'Time has gone! End time: {0}', # 1.16.2 'Polling is over', # 1.16.3 - 'You forgot to supply the required arguments to this or to the command enter arguments as arguments with `[` and `],`. Follow the example below. And yes, between the parentheses, a comma without any spaces is required.\n\n```{0}poll How did you meet 2021? Good or bad? -o [Awesome],[Good],[I don\'t care],[So bad] 2020-01-10=20:00```'.format(prefix), # 1.16.4 + 'You forgot to supply the required arguments to this or to the command enter arguments as arguments with `[` and `],`. Follow the example below. And yes, between the parentheses, a comma without any spaces is required.\n\n```{0}poll How did you meet 2021? Good or bad? -o [Awesome],[Good],[I don\'t care],[So bad] 2020-01-10=20:00```', # 1.16.4 'The voting end date must not be earlier than today.' ], [ # 1.16 @@ -281,10 +308,14 @@ def get(): 'Okay, you demoted it.', # 1.17.3 'Okay, you promoted it.', # 1.17.4 'Example', # 1.17.5 - '```{0}rep ```'.format(prefix), # 1.17.6 + '```{0}rep ```', # 1.17.6 'This person is not in our database.', # 1.7.7 'You already promoted it.', # 1.7.8 'You already demoted it.' # 1.7.9 + ], + [ # 1.18 + 'Congratulations!', # 1.18.0 + '{0} has moved to a new level **{1}**! The main thing is to be active.' # 1.18.1 ] ] ] \ No newline at end of file diff --git a/discord_bot/d_languages/ru_RU.py b/discord_bot/d_languages/ru_RU.py index 832ecce..8f2db88 100644 --- a/discord_bot/d_languages/ru_RU.py +++ b/discord_bot/d_languages/ru_RU.py @@ -1,5 +1,5 @@ import importlib.util -spec = importlib.util.spec_from_file_location("botconfig", "/home/runner/visionbot/discord_bot/discord_botconfig.py") +spec = importlib.util.spec_from_file_location("botconfig", "./discord_bot/discord_botconfig.py") botconfig = importlib.util.module_from_spec(spec) spec.loader.exec_module(botconfig) @@ -10,7 +10,7 @@ def get(): 'Russian', [ [ - ' - простой и немного расширяемый. Developed by Tinelix. **Префикс:** `{0}`\n\n**А Вы знаете, что...** {1}', + ' - простой и немного расширяемый. Developed by Tinelix. **Префикс:** `{0}`{1}\n\n**А Вы знаете, что...** {2}', [ # 1.0.1 'Основное', # 1.0.1.0 '`help`, `state`, `profile`, `tnews`, `feedback`, `info`' # 1.0.1.1 @@ -47,15 +47,14 @@ def get(): ' кБ', ' МБ', ' ГБ', - ' свободно', - 'Идет сбор данных, так как это может занимать время.' + ' свободно' ], [ 'Настройки', - 'Для доступа к нужной настройке нажмите на одну из соотвествующих реакций.\n\n**🗣️ Язык бота (Bot language)**\n**🕓 Часовой пояс**\n**🗨️ Счетчик сообщений**\n**🌈 Свой цвет вложенных сообщений**', + 'Для доступа к нужной настройке нажмите на одну из соотвествующих реакций.\n\n**🗣️ Язык бота (Bot language)**\n**🕓 Часовой пояс**\n**🗨️ Счетчик сообщений**\n**🌈 Свой цвет вложенных сообщений**\n🚩 **Префикс бота** (бета)\n🏆 **Система уровней** (бета)\n👋 **Приветственные/прощальные сообщения** (бета)', [ 'Язык бота (Bot language)', - 'Для изменения значения введите команды, которые указаны внизу.\n\n**🇷🇺 Русский**\n```{0}set -l ru-RU```\n\n**🇺🇸 English**\n```{0}set -l en-US```'.format(prefix) + 'Для изменения значения введите команды, которые указаны внизу.\n\n**🇷🇺 Русский**\n```{0}set -l ru-RU```\n\n**🇺🇸 English**\n```{0}set -l en-US```' ], [ 'Часовой пояс', @@ -63,8 +62,8 @@ def get(): 'Допустимые значения', 'От -120 до 140 (UTC)', 'Пример', - '```{0}set -tz -80\n{0}set -tz 30\n{0}set -tz 55```'.format(prefix), - '-80 для UTC-8:00, 30 для UTC+3:00 (Москва), 55 для UTC+5:30.'.format(prefix) + '```{0}set -tz -80\n{0}set -tz 30\n{0}set -tz 55```', + '-80 для UTC-8:00, 30 для UTC+3:00 (Москва), 55 для UTC+5:30.' ], [ 'Ошибка', @@ -86,17 +85,43 @@ def get(): 'Допустимые значения', # 1.2.6.3 '`on` - включить, `off` - отключить', # 1.2.6.4 'Пример', # 1.2.6.5 - '```{0}set -mc on```'.format(prefix) # 1.2.6.6 + '```{0}set -mc on```' # 1.2.6.6 ], [ # 1.2.7 - 'Свой цвет вложенных сообщений (🏠)', # 1.2.7.0 - 'Допустимые значения', # 1.2.7.1 - '`red`, `orange`, `yellow`, `green`, `skyblue`, `blue`, `violet`, `rose`', # 1.2.7.2 - 'Пример', # 1.2.7.3 - '```{0}set -ec skyblue```'.format(prefix), # 1.2.7.4 - 'Свой цвет вложенных сообщений (🏠)', # 1.2.7.5 - 'Изменения сохранены.' # 1.2.7.6 - ] + 'Свой цвет вложенных сообщений (🏠)', # 1.2.7.0 + 'Допустимые значения', # 1.2.7.1 + '`red`, `orange`, `yellow`, `green`, `skyblue`, `blue`, `violet`, `rose`', # 1.2.7.2 + 'Пример', # 1.2.7.3 + '```{0}set -ec skyblue```', # 1.2.7.4 + 'Свой цвет вложенных сообщений (🏠)', # 1.2.7.5 + 'Изменения сохранены.' # 1.2.7.6 + ], + [ # 1.2.8 + 'Префикс бота', # 1.2.8.0 + 'Значение по умолчанию', # 1.2.8.1 + 'Пример', # 1.2.8.2 + '```{0}set -pfx v!```', # 1.2.8.3 + 'Изменения сохранены.', # 1.2.8.4 + '**ВНИМАНИЕ!** Поскольку вы сейчас используете самую свежую версию бота, то, соответственно, эта настройка может нуждаться в доработке.', # 1.2.8.4 + ], + [ # 1.2.9 + 'Система уровней', + 'Допустимые значения', + '`on` - включить, `off` - отключить', + 'Пример', + '```{0}set -lvs on```' + ], + [ # 1.2.10 + 'Приветственные/прощальные сообщения', # 1.2.10.0 + 'Допустимые значения', # 1.2.10.1 + '`[ID канала] [Текст]` - включить или отредактировать\n`off` - отключить', # 1.2.10.2 + 'Пример', # 1.2.10.3 + '```{0}set -wl_msg 794585820312633354 Привет, ╭user╮\n{0}set -gb_msg 794585820312633354 Пока, ╭user╮```', # 1.2.10.4 + 'Автоформатирование', # 1.2.10.5 + '`{user}` - имя пользователя\n`{user_with_discrim}` - имя пользователя с дискриминатором\n`{gn}` - имя сервера\n`{mention}` - упоминание пользователя', # 1.2.10.6 + 'Ошибка', # 1.2.10.7 + 'Этот канал невозможно найти на Вашем Discord-сервере.' # 1.2.10.8 + ] ], [ # 1.3 'О пользователе ', # 1.3.0 @@ -118,7 +143,8 @@ def get(): ], 'Роли ', # 1.3.12 'Дата отправки последнего сообщ.', # 1.3.13 - 'Репутация' + 'Репутация', + 'Уровень' ], [ 'О сервере ', @@ -160,8 +186,8 @@ def get(): ], [ 'Профили', - '`{0}profile -u [ID]` - узнать информацию о пользователе.\n`{0}profile -g` - узнать информацию о сервере'.format(prefix), - '**Свои параметры** (изменить можно в `{0}settings`)**:**\n'.format(prefix), + '`{0}profile -u [ID]` - узнать информацию о пользователе.\n`{0}profile -g` - узнать информацию о сервере', + '**Свои параметры** (изменить можно в `{0}settings`)**:**\n', 'вкл. счетчик сообщений', 'часовой пояс UTC', '', @@ -195,14 +221,14 @@ def get(): 'Лайков', # 1.8.2 'Пока хватит!', # 1.8.3 'Посмотреть еще фотки можно будет только через час, так как в API Unsplash действует лимит - не больше 50 запросов за час. Приносим извинения за доставленные неудобства.', # 1.8.4 - '`{0}photo -u` - просмотр фотографий из Unsplash.\n`{0}photo -r` - просмотр фотографий из сабреддитов.'.format(prefix) # 1.8.5 + '`{0}photo -u` - просмотр фотографий из Unsplash.\n`{0}photo -r` - просмотр фотографий из сабреддитов.' # 1.8.5 ], [ # 1.9 'Калькулятор', # 1.9.0 'Листинг', # 1.9.1 'Результат', # 1.9.2 'Обнаружено исключение!\n', # 1.9.3 - 'Вы забыли ввести выражение.\n```{0}calc 4 * 58```'.format(prefix), # 1.9.4 + 'Вы забыли ввести выражение.\n```{0}calc 4 * 58```', # 1.9.4 'В этой версии Калькулятора можно совершать только простые арифметические выражения.', # 1.9.5 'Доступные знаки', # 1.9.7 '`+` - прибавить\n`-` - убавить\n`*` - умножить\n`/` - разделить' # 1.9.8 @@ -211,7 +237,7 @@ def get(): 'Обратная связь', # 1.10.0 'Баг-трекер {0}'.format(name), # 1.10.1 'Автор бота ответит на Ваш вопрос в ближайшее время, подождите.', # 1.10.2 - 'Вы забыли указать аргументы. Кстати, можно скриншоты отправлять, так проще разобраться.\n\n```{0}feedback Привет!```'.format(prefix), # 1.10.3 + 'Вы забыли указать аргументы. Кстати, можно скриншоты отправлять, так проще разобраться.\n\n```{0}feedback Привет!```', # 1.10.3 'Вам ответили: ' # 1.10.4 ], [ # 1.11 @@ -252,10 +278,10 @@ def get(): 'Вам предстоит выбрать тип данных для кодирования из обычной строки. Выбор типа осуществляется нажатием на соответствующую реакцию.', # 1.14.2 '1️⃣ Base64\n2️⃣ Base32\n3️⃣ Base16\n4️⃣ Двоичный код', # 1.14.3 'Результат', - '`{0}codec -d` - расшифровка текста\n`{0}codec -e` - зашифровка текста'.format(prefix), + '`{0}codec -d` - расшифровка текста\n`{0}codec -e` - зашифровка текста', 'Расшифровать не получилось. Неверно выбран тип данных.', 'Просмотр в Embed-сообщении невозможен.', - 'Вы забыли ввести текст.\n\n```{0}codec -e Привет!\n{0}codec -d SGVsbG8h```'.format(prefix) + 'Вы забыли ввести текст.\n\n```{0}codec -e Привет!\n{0}codec -d SGVsbG8h```' ], [ # 1.15 'О боте', # 1.15.0 @@ -263,16 +289,17 @@ def get(): 'Написан на', # 1.15.2 'Автор', # 1.15.3 'Мониторинги ботов', # 1.15.4 - '[bots.server-discord.com](https://bots.server-discord.com/785383439196487720)\n[BotiCord](https://boticord.top/bot/785383439196487720)\n[Bots for Discord](https://botsfordiscord.com/bot/785383439196487720)\n[top.gg](https://top.gg/bot/785383439196487720)', # 1.15.5 + '[bots.server-discord.com](https://bots.server-discord.com/785383439196487720)\n[BotiCord](https://boticord.top/bot/785383439196487720)\n[Bots for Discord](https://botsfordiscord.com/bot/785383439196487720)', # 1.15.5 'Ссылки', # 1.15.5 - '[Пригласить бота](https://discord.com/api/oauth2/authorize?client_id=785383439196487720&permissions=8&scope=bot)\n[GitHub](https://github.com/tinelix/visionbot)\n[ВКонтакте](https://vk.com/tinelix)\n[YouTube](https://www.youtube.com/channel/UCSPjn_Y0pLdPy6Ncb9NAdww)\n[Сервер в Discord](https://discord.gg/fYRjHvXntj)\n[Наш саппорт-сервер](https://discord.gg/HAt6K2QuJU)' # 1.15.6 + '[Пригласить бота](https://discord.com/api/oauth2/authorize?client_id=785383439196487720&permissions=8&scope=bot)\n[GitHub](https://github.com/tinelix/visionbot)\n[ВКонтакте](https://vk.com/tinelix)\n[YouTube](https://www.youtube.com/channel/UCSPjn_Y0pLdPy6Ncb9NAdww)\n[Наш саппорт-сервер](https://discord.gg/HAt6K2QuJU)', # 1.15.6 + '[Пригласить бота](https://discord.com/oauth2/authorize?client_id=769515555765616690&permissions=8&scope=bot)\n[GitHub](https://github.com/tinelix/visionbot)\n[ВКонтакте](https://vk.com/tinelix)\n[YouTube](https://www.youtube.com/channel/UCSPjn_Y0pLdPy6Ncb9NAdww)\n[Наш саппорт-сервер](https://discord.gg/HAt6K2QuJU)' ], [ # 1.16 'Голосование', # 1.16.0 'Вести это голосование могут только администраторы сервера.', # 1.16.1 'Время пошло! Время окончания: {0}', # 1.16.2 'Голосование закончено.', # 1.16.3 - 'Вы забыли указать требуемые аргументы к этой команде или разделить аргументы знаками `[` и `],`. Следуйте примером внизу. И да, между скобками запятая без каких-либо пробелов обязательна.\n\n```{0}poll Как встретили 2021 год? Хорошо или плохо? -o [Отлично],[Хорошо],[А мне все равно],[Ужасно] 2020-01-10=20:00```'.format(prefix), # 1.16.4 + 'Вы забыли указать требуемые аргументы к этой команде или разделить аргументы знаками `[` и `],`. Следуйте примером внизу. И да, между скобками запятая без каких-либо пробелов обязательна.\n\n```{0}poll Как встретили 2021 год? Хорошо или плохо? -o [Отлично],[Хорошо],[А мне все равно],[Ужасно] 2020-01-10=20:00```', # 1.16.4 'Дата окончания голосования не должна быть раньше, чем сегодняшняя.' ], [ # 1.17 @@ -282,10 +309,14 @@ def get(): 'Окей, Вы его понизили.', 'Окей, Вы его повысили.', 'Пример', - '```{0}rep ```'.format(prefix), + '```{0}rep ```', 'Этого человека нет в нашей базе данных.', 'Вы его уже повысили.', 'Вы его уже понизили.' + ], + [ # 1.18 + 'Поздравляем!', + '{0} перешел на новый уровень **{1}**! Главное - проявлять активность.' ] ] ] diff --git a/discord_bot/discord_botconfig.py b/discord_bot/discord_botconfig.py index 5557048..114b523 100644 --- a/discord_bot/discord_botconfig.py +++ b/discord_bot/discord_botconfig.py @@ -12,7 +12,7 @@ 'accent1': 0xd7832a, 'accent2': 0xcb3532, 'accent3': 0x6eda5f, - 'version': '01R7-210118', + 'version': '01R8-210121', 'owner': '741883312108339231', 'logs_channel': 788723868255649832, 'unsplash_ak': os.environ['UNSAKEY'], diff --git a/main.py b/main.py index 42b9dcd..e09a3b6 100644 --- a/main.py +++ b/main.py @@ -1 +1 @@ -import discord_bot.bot_d +import discord_bot.bot_d \ No newline at end of file