Archived
generated from imcompiling/discord-bot-template
50 lines
1.5 KiB
Python
50 lines
1.5 KiB
Python
"""Contains functions for open raid sign-ups."""
|
|
|
|
import nextcord
|
|
|
|
|
|
class OpenRaid(nextcord.ui.View):
|
|
"""Class defines view for buttons on an open raid schedule message."""
|
|
|
|
def __init__(self) -> None:
|
|
super().__init__(timeout=None, auto_defer=True)
|
|
|
|
@nextcord.ui.button(label="Tank", style=nextcord.ButtonStyle.blurple)
|
|
async def tank(self, button: nextcord.ui.Button, interaction: nextcord.Interaction) -> None:
|
|
"""
|
|
Signs a user up as a tank.
|
|
|
|
Removes them if they are already signed up.
|
|
|
|
Args:
|
|
button (nextcord.ui.Button): Unneeded.
|
|
interaction (nextcord.Interaction): Interaction with command.
|
|
|
|
"""
|
|
|
|
@nextcord.ui.button(label="Healer", style=nextcord.ButtonStyle.green)
|
|
async def healer(self, button: nextcord.ui.Button, interaction: nextcord.Interaction) -> None:
|
|
"""
|
|
Signs a user up as a healer.
|
|
|
|
Removes them if they are already signed up.
|
|
|
|
Args:
|
|
button (nextcord.ui.Button): Unneeded.
|
|
interaction (nextcord.Interaction): Interaction with command.
|
|
|
|
"""
|
|
|
|
@nextcord.ui.button(label="DPS", style=nextcord.ButtonStyle.red)
|
|
async def dps(self, button: nextcord.ui.Button, interaction: nextcord.Interaction) -> None:
|
|
"""
|
|
Signs a user up as dps.
|
|
|
|
Removes them if they are already signed up.
|
|
|
|
Args:
|
|
button (nextcord.ui.Button): Unneeded.
|
|
interaction (nextcord.Interaction): Interaction with command.
|
|
|
|
"""
|