Skip to content

Commit

Permalink
Add poll command to poll_cog.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Zingzy committed Dec 26, 2023
1 parent 8e8927a commit da29ca6
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
27 changes: 27 additions & 0 deletions .github/workflows/format.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Format Code

on:
push:
branches:
- main # Change this to your main branch name

jobs:
format_code:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.11

- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install black
- name: Format Python Files
run: black .
7 changes: 6 additions & 1 deletion cogs/poll_cog.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@
class polling(commands.Cog):
def __init__(self, bot):
self.bot = bot


@app_commands.command(name="poll", description="Create a poll")
@app_commands.guild_only()
@app_commands.checks.cooldown(1, 300)
async def poll(self, interaction, question: str):
pass

async def setup(bot):
bot.add_cog(polling(bot))
Expand Down

0 comments on commit da29ca6

Please sign in to comment.