renamed waifu to anime

removed unused ftp function in essentials
This commit is contained in:
phixxy 2024-01-22 21:46:33 -08:00
parent 7ea905be7e
commit 62b67fa843
2 changed files with 6 additions and 23 deletions

View file

@ -2,7 +2,7 @@ import random
from discord.ext import commands from discord.ext import commands
import discord import discord
class Waifu(commands.Cog): class Anime(commands.Cog):
def __init__(self, bot): def __init__(self, bot):
self.bot = bot self.bot = bot
@ -72,7 +72,7 @@ class Waifu(commands.Cog):
async def setup(bot): async def setup(bot):
try: try:
await bot.add_cog(Waifu(bot)) await bot.add_cog(Anime(bot))
print("Successfully added Waifu Cog") print("Successfully added Anime Cog")
except: except:
print("Failed to load Waifu Cog") print("Failed to load Anime Cog")

View file

@ -9,7 +9,7 @@ async def handle_error(error):
print(error) print(error)
current_time = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()) current_time = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
log_line = current_time + ': ' + str(error) + '\n' log_line = current_time + ': ' + str(error) + '\n'
with open("databases/error_log.txt", 'a') as f: with open("data/error_log.txt", 'a') as f:
f.write(log_line) f.write(log_line)
return error return error
@ -60,22 +60,6 @@ async def view_images(ctx, message):
else: else:
await ctx.send("Usage: !viewimages (enable|disable)") await ctx.send("Usage: !viewimages (enable|disable)")
@commands.command(
description="FTP",
help="Enable or disable bot FTP to phixxy.com in this channel. Usage !ftp (enable|disable)",
brief="Enable or disable uploading to web"
)
async def ftp(ctx, message):
if "enable" in message:
edit_channel_config(ctx.channel.id, "ftp_enabled", True)
await ctx.send("FTP Enabled")
elif "disable" in message:
edit_channel_config(ctx.channel.id, "ftp_enabled", False)
await ctx.send("FTP Disabled")
else:
await ctx.send("Usage: !ftp (enable|disable)")
@commands.command( @commands.command(
description="Personality", description="Personality",
help="Set the personality of the bot. Usage: !personality (personality)", help="Set the personality of the bot. Usage: !personality (personality)",
@ -165,7 +149,7 @@ async def errors(ctx, amount="5"):
output = "" output = ""
amount = int(amount) amount = int(amount)
try: try:
with open("databases/error_log.txt", 'r') as f: with open("data/error_log.txt", 'r') as f:
for line in (f.readlines() [-amount:]): for line in (f.readlines() [-amount:]):
output += line output += line
await ctx.send(output) await ctx.send(output)
@ -180,6 +164,5 @@ async def setup(bot):
bot.add_command(topic) bot.add_command(topic)
bot.add_command(enable_commands) bot.add_command(enable_commands)
bot.add_command(personality) bot.add_command(personality)
bot.add_command(ftp)
bot.add_command(view_images) bot.add_command(view_images)
bot.add_command(errors) bot.add_command(errors)