Compare commits
2
Commits
dbad01da5c
..
0.6.3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
556be5fbe6 | ||
|
|
34aed5421a |
@@ -55,7 +55,7 @@ async def post_reddit_periodically():
|
|||||||
async def get_latest_post(subreddit):
|
async def get_latest_post(subreddit):
|
||||||
post_limit = os.getenv("POST_LIMIT", 20)
|
post_limit = os.getenv("POST_LIMIT", 20)
|
||||||
url = f"https://www.reddit.com/r/{subreddit}/hot.rss?limit={post_limit}"
|
url = f"https://www.reddit.com/r/{subreddit}/hot.rss?limit={post_limit}"
|
||||||
headers = {"User-Agent": "Mozilla/5.0 (compatible; ich_iel-Bot/0.6.2)"}
|
headers = {"User-Agent": "Mozilla/5.0 (compatible; ich_iel-Bot/0.6.3)"}
|
||||||
response = requests.get(url, headers=headers)
|
response = requests.get(url, headers=headers)
|
||||||
if response.status_code != 200:
|
if response.status_code != 200:
|
||||||
logging.error(f"Failed to fetch RSS feed: {response.status_code}")
|
logging.error(f"Failed to fetch RSS feed: {response.status_code}")
|
||||||
@@ -121,7 +121,7 @@ async def setChannel(message):
|
|||||||
|
|
||||||
@bot.command()
|
@bot.command()
|
||||||
async def version(message):
|
async def version(message):
|
||||||
await message.channel.send("Version 0.6.2 is running\nSource code: https://github.com/michelleDeko/ich_iel-bot")
|
await message.channel.send("Version 0.6.3 is running\nSource code: https://github.com/michelleDeko/ich_iel-bot")
|
||||||
|
|
||||||
# the cat bot died, so i wanted to add this command to this bot
|
# the cat bot died, so i wanted to add this command to this bot
|
||||||
@bot.command()
|
@bot.command()
|
||||||
@@ -164,6 +164,8 @@ async def fox(message):
|
|||||||
|
|
||||||
# time for racoons
|
# time for racoons
|
||||||
@bot.command()
|
@bot.command()
|
||||||
|
@bot.command("raccoon")
|
||||||
|
@bot.command("coon")
|
||||||
async def racoon(message):
|
async def racoon(message):
|
||||||
urls = random.choice([
|
urls = random.choice([
|
||||||
"https://api.mapach.es/v1/meme",
|
"https://api.mapach.es/v1/meme",
|
||||||
@@ -180,6 +182,8 @@ async def racoon(message):
|
|||||||
# i just watched beastars and i realised that this bot needs a bnuy command
|
# i just watched beastars and i realised that this bot needs a bnuy command
|
||||||
# maybe I will switch the API later since this one seems to only have gifs
|
# maybe I will switch the API later since this one seems to only have gifs
|
||||||
@bot.command()
|
@bot.command()
|
||||||
|
@bot.command("bnuuy")
|
||||||
|
@bot.command("bunny")
|
||||||
async def bnuy(message):
|
async def bnuy(message):
|
||||||
urls = random.choice([
|
urls = random.choice([
|
||||||
"https://api.bunnies.io/v2/loop/random/?media=gif,png",
|
"https://api.bunnies.io/v2/loop/random/?media=gif,png",
|
||||||
|
|||||||
Reference in New Issue
Block a user