All checks were successful
Build and push / changes (push) Successful in 3s
Build and push / Lint-Python (push) Successful in 2s
Build and push / Build-and-Push-Docker (push) Successful in 2m51s
Build and push / sync-argocd-app (push) Successful in 2s
Build and push / post-status-to-discord (push) Successful in 2s
56 lines
1.7 KiB
Python
Executable File
56 lines
1.7 KiB
Python
Executable File
from discord.ext import commands
|
|
import discord
|
|
import animals
|
|
|
|
|
|
class AnimalFunctions(commands.Cog):
|
|
def __init__(self, bot):
|
|
self.bot: commands.Bot = bot
|
|
|
|
@commands.slash_command(
|
|
guild_ids=None, name="redpanda", description="Posts a photo of a redpanda"
|
|
)
|
|
async def redpanda(self, ctx: discord.ApplicationContext):
|
|
await ctx.respond(animals.get_red_panda())
|
|
|
|
@commands.slash_command(
|
|
guild_ids=None, name="dog", description="Posts a photo of a Dog"
|
|
)
|
|
async def dog(self, ctx: discord.ApplicationContext):
|
|
await ctx.respond(animals.get_dog())
|
|
|
|
@commands.slash_command(
|
|
guild_ids=None, name="sheeb", description="Posts a photo of a Sheeb"
|
|
)
|
|
async def sheeb(self, ctx: discord.ApplicationContext):
|
|
await ctx.defer()
|
|
await ctx.send_followup(animals.random_sheeb())
|
|
|
|
@commands.slash_command(
|
|
guild_ids=None, name="cowboy", description="Posts a photo of a bad dog"
|
|
)
|
|
async def cowboy(self, ctx: discord.ApplicationContext):
|
|
await ctx.respond(animals.cowboy())
|
|
|
|
@commands.slash_command(
|
|
guild_ids=None,
|
|
name="dale",
|
|
description="Posts a photo of the goodest boy. Rest in power king",
|
|
contexts={
|
|
discord.InteractionContextType.guild,
|
|
discord.InteractionContextType.bot_dm,
|
|
discord.InteractionContextType.private_channel,
|
|
},
|
|
integration_types={
|
|
discord.IntegrationType.guild_install,
|
|
discord.IntegrationType.user_install,
|
|
},
|
|
)
|
|
async def dale_slash(self, ctx: discord.ApplicationContext):
|
|
await ctx.defer()
|
|
await ctx.send_followup(file=discord.File(animals.dale()))
|
|
|
|
|
|
def setup(bot):
|
|
bot.add_cog(AnimalFunctions(bot))
|