diff --git a/bot.py b/bot.py index 7bb3fa3..3deffe6 100644 --- a/bot.py +++ b/bot.py @@ -9,8 +9,6 @@ import aiohttp import mimetypes import requests -# import subprocess - bot = commands.Bot(command_prefix=".", intents=discord.Intents.default(), case_insensitive=True) @@ -23,7 +21,6 @@ logging.basicConfig(filename='console.log', ) logging.getLogger().addHandler(logging.StreamHandler(sys.stdout)) - @bot.event async def on_ready(): # Marks bot as running @@ -61,7 +58,7 @@ async def on_message(message): response = response + "\nRequested by " + message.author.mention if truncated: response = response + "\n(file was truncated because it was too long.)" - embed_var = discord.Embed(title="Please use a paste service", color=0x1D83D4) + embed_var = discord.Embed(title="Converted to an online paste file: ", color=0x1D83D4) embed_var.description = response try: await message.channel.send(embed=embed_var) @@ -85,7 +82,7 @@ async def on_message(message): key = json.loads(await req.read())['key'] response = "" response = response + "https://bin.birdflop.com/" + key - response = response + "\nRequested by " + message.author.mention + response = response + "\nUploaded by " + message.author.mention if truncated: response = response + "\n(file was truncated because it was too long.)" embed_var = discord.Embed(title="Pastebin is blocked in some countries", color=0x1D83D4) @@ -103,23 +100,8 @@ async def on_message(message): async def ping(ctx): await ctx.send(f'Bot ping is {round(bot.latency * 1000)}ms') -@bot.command() -async def invite(ctx): - await ctx.send('Invite me with this link:\n-not setup-') - -@bot.command(name="react", pass_context=True) -@has_permissions(administrator=True) -async def react(ctx, url, reaction): - channel = await bot.fetch_channel(int(url.split("/")[5])) - message = await channel.fetch_message(int(url.split("/")[6])) - await message.add_reaction(reaction) - logging.info('reacted to ' + url + ' with ' + reaction) - for file_name in os.listdir('./cogs'): if file_name.endswith('.py'): bot.load_extension(f'cogs.{file_name[:-3]}') - -bot.run(token) - -# full name: message.author.name + "#" + str(message.author.discriminator) + " (" + str(message.author.id) + ")" +bot.run(token) \ No newline at end of file