Pepe functionality

This commit is contained in:
cameron 2024-05-10 04:27:38 -04:00
parent 362bef1202
commit c4b6bab452
2 changed files with 1266 additions and 5 deletions

1251
plugins/pepe/pepes.txt Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,10 +1,20 @@
# Posts a dank pepe in the chat
from discord.ext import commands
import discord
import random
import os
@commands.command()
async def hello(ctx):
await ctx.send(f'Hello {ctx.author.display_name}.')
plugin_folder=os.path.dirname(os.path.realpath(__file__))
pepe_filename=os.path.join(plugin_folder, 'pepes.txt')
@commands.command(name='pepe')
async def send_pepe(ctx):
with open(pepe_filename, 'r') as pepe_file:
pepeLines = pepe_file.readlines()
num_pepes = len(pepeLines)
chosen_pepe = pepeLines[random.randint(0,num_pepes-1)]
await ctx.send(f'{chosen_pepe}')
async def setup(bot):
print("I am being loaded!")
bot.add_command(hello)
print("Rare Pepes initialized")
bot.add_command(send_pepe)