From 0438b55ce6495c9b2494c0fa497e48bbe86ee586 Mon Sep 17 00:00:00 2001 From: crate Date: Thu, 22 May 2025 16:46:22 -0500 Subject: [PATCH] remove tenor gif bs --- README.md | 1 - garfmain.py | 30 ------------------------------ 2 files changed, 31 deletions(-) diff --git a/README.md b/README.md index eeca586..7ac0ede 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,6 @@ Add your various API tokens: ```python GARFBOT_TOKEN = "Discord API token" OPENAI_TOKEN = "OpenAI API token" -GIF_TOKEN = "tenor.com API token" ``` I recommend building a docker image using the included DockerFile as a template. Run the container binding /usr/src/app to GarfBot's CWD: diff --git a/garfmain.py b/garfmain.py index 412e86d..2e23bbd 100644 --- a/garfmain.py +++ b/garfmain.py @@ -1,5 +1,4 @@ import config -# import random import asyncio import discord import subprocess @@ -50,16 +49,6 @@ async def on_message(message): await message.channel.send(f"`Please wait... image generation queued: {prompt}`") await picture_time(message, prompt) - # if message.content.lower() == "lasagna": - # await send_gif(message, "garfield lasagna") - - # if message.content.lower() == "monday": - # await send_gif(message, "garfield monday") - - # if message.content.lower().startswith("garfgif "): - # search_term = message.content[8:] - # await send_gif(message, search_term) - if message.content.lower().startswith("garfping "): try: query = message.content.split() @@ -137,25 +126,6 @@ async def on_message(message): await aod_message(garfbot, message) -# # GarfGifs -# @garfbot.event -# async def send_gif(message, search_term): -# lmt = 50 -# ckey = "garfbot" -# r = requests.get(f"https://tenor.googleapis.com/v2/search?q={search_term}&key={gapikey}&client_key={ckey}&limit={lmt}") -# if r.status_code == 200: -# top_50gifs = json.loads(r.content) -# gif_url = random.choice(top_50gifs["results"])["itemurl"] -# logger.info(gif_url) -# # logger.info(gif_url) -# try: -# await message.channel.send(gif_url) -# except KeyError: -# await message.channel.send("Oops, something went wrong.") -# else: -# await message.channel.send(f"`Oops, something went wrong. Error code: {r.status_code}`") - - async def garfbot_connect(): while True: try: