Skip to content

Commit 9703136

Browse files
Merge pull request #40 from FSU-ACM/update-discord-py
2 parents 48d191d + 3a0097e commit 9703136

File tree

19 files changed

+430
-292
lines changed

19 files changed

+430
-292
lines changed

.gitattributes

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Make sure that shell scripts always use LF -- Windows likes to automatically change it to CRLF
2+
*.sh text eol=lf
3+
4+
# Make sure Python scripts aren't modified either
5+
*.py text eol=lf

CONTRIBUTING.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ Programming-Contest-Suite/
6161
├── register/
6262
├── static/
6363
├── templates/
64-
├── bot.py
6564
└── manage.py
6665
```
6766

@@ -77,7 +76,6 @@ Programming-Contest-Suite/
7776
- `register`: user account registration and team creation
7877
- `static`: target directory for all project static files upon deployment (placeholder dir)
7978
- `templates`: target directory for all project HTML templates upon deployment
80-
- `bot.py`: Discord bot which assists in LFG profile verification
8179
- `manage.py`: Django management entrypoint
8280

8381
## Testing & Development Server

Pipfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ django-import-export = "*"
1212
celery = "*"
1313
gunicorn = "*"
1414
six = "*"
15-
"discord.py" = "<2.0"
1615
requests = "*"
1716
django-hashid-field = "*"
1817
django-celery-beat = "*"
1918
flower = "*"
19+
discord-py = "==2.5.0"
2020

2121
[dev-packages]
2222

Pipfile.lock

Lines changed: 403 additions & 46 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

deploy/docker-compose.yml

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ services:
1414
SQL_DATABASE: contestsuite
1515
SQL_USER: contestadmin
1616
SQL_PASSWORD: seminoles1!
17-
18-
# Discord
19-
GUILD_ID: # Discord Server ID
2017
ports:
2118
- 8000:8000
2219
volumes:
@@ -29,29 +26,6 @@ services:
2926
- rabbitmq
3027
- celery_worker
3128
restart: unless-stopped
32-
scrape_bot:
33-
image: contestsuite:dev
34-
command: /docker/start.sh bot
35-
environment:
36-
# Django
37-
DEBUG: 'True'
38-
39-
# Database
40-
SQL_DATABASE: contestsuite
41-
SQL_USER: contestadmin
42-
SQL_PASSWORD: seminoles1!
43-
44-
# Discord
45-
BOT_CHANNEL: # Name of command channel
46-
GUILD_ID: # Discord Server ID
47-
SCRAPE_BOT_TOKEN: # Token for the member list scraping bot
48-
volumes:
49-
- ../src:/app
50-
networks:
51-
- contestsuite
52-
depends_on:
53-
- mariadb
54-
- django
5529
celery_worker:
5630
image: contestsuite:dev
5731
command: /docker/start.sh worker debug
@@ -66,7 +40,6 @@ services:
6640

6741
# Discord
6842
ANNOUNCEMENT_WEBHOOK_URL: # Webhook URL of the contest announcements channel
69-
BOT_CHANNEL_WEBHOOK_URL: # Webhook URL of the bot command channel
7043
volumes:
7144
- ../src:/app
7245
networks:

docs/deployment/configuration.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,6 @@ The following variables, located in the main settings file[^1], map to various P
106106
Variable | Default | Description
107107
---|---|---
108108
ANNOUNCEMENT_WEBHOOK_URL | None | URL of Discord server's announcement channel webhook |
109-
BOT_CHANNEL_WEBHOOK_URL | None | URL of Discord server's bot command channel webhook |
110-
GUILD_ID | 0 | Discord server's Guid ID |
111-
SCRAPE_BOT_TOKEN | None | Discord bot token required by the LFG helper bot |
112109

113110
## Misc
114111

docs/deployment/docker/docker_compose.md

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ services:
2525
SQL_DATABASE: contestsuite
2626
SQL_USER: contestadmin
2727
SQL_PASSWORD: seminoles1!
28-
29-
# Discord
30-
GUILD_ID: # Discord Server ID
3128
ports:
3229
- 8000:8000
3330
volumes:
@@ -40,29 +37,6 @@ services:
4037
- rabbitmq
4138
- celery_worker
4239
restart: unless-stopped
43-
scrape_bot:
44-
image: contestsuite:dev
45-
command: /docker/start.sh bot
46-
environment:
47-
# Django
48-
DEBUG: 'True'
49-
50-
# Database
51-
SQL_DATABASE: contestsuite
52-
SQL_USER: contestadmin
53-
SQL_PASSWORD: seminoles1!
54-
55-
# Discord
56-
BOT_CHANNEL: # Name of command channel
57-
GUILD_ID: # Discord Server ID
58-
SCRAPE_BOT_TOKEN: # Token for the member list scraping bot
59-
volumes:
60-
- ../src:/app
61-
networks:
62-
- contestsuite
63-
depends_on:
64-
- mariadb
65-
- django
6640
celery_worker:
6741
image: contestsuite:dev
6842
command: /docker/start.sh worker debug
@@ -77,7 +51,6 @@ services:
7751

7852
# Discord
7953
ANNOUNCEMENT_WEBHOOK_URL: # Webhook URL of the contest announcements channel
80-
BOT_CHANNEL_WEBHOOK_URL: # Webhook URL of the bot command channel
8154
volumes:
8255
- ../src:/app
8356
networks:

docs/deployment/docker/docker_image.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ REQUIREMENTS | requirements.txt | Path to the manifest file to use during image
2424

2525
## Run Image
2626

27-
The `Dockerfile` specifies an image capable of running the Django web app, Celery, or a helper Discord bot. The parameters passed to the image's start script `start.sh` determine the container's behavior.
27+
The `Dockerfile` specifies an image capable of running the Django web app, Celery, or Flower. The parameters passed to the image's start script `start.sh` determine the container's behavior.
2828

2929
```bash
3030
docker run <image_name> /docker/start.sh <PROCESS_TYPE> <MODE>
@@ -36,7 +36,6 @@ server | Yes | Gunicorn server bound to the Django app
3636
worker | No | Celery Worker
3737
beat | No | Celery Beat
3838
flower | No | Celery Flower
39-
bot | No | Discord bot
4039

4140
`MODE` | Default | Usage
4241
---|---|---

docs/usage/contest_administration/contest_dashboard.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,5 @@ The Contest Dashboard centralizes many of the administrator actions available in
3131
- **Account Tools**
3232
- Manually activate a user account. Useful if a registrant has issues verifying their account.
3333
- Mark a given team as a Faculty Team
34-
- **Discord Tools**
35-
- Creates the Upper/Lower Division Looking For Group roles on a Discord server
36-
- server specified by `GUILD_ID` configuration variable
37-
- Removes the Upper/Lower Division Looking For Group roles on a Discord server
38-
- server specified by `GUILD_ID` configuration variable
39-
- **Clear Discord Channel**
40-
- Clears a channel on a Discord server of all content
41-
- server specified by `GUILD_ID` configuration variable
4234
- **Volunteers**
4335
- Displays all volunteers registered in the system, whether they have registered for extra credit, and if they've checked into the contest

requirements-dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ cron-descriptor==1.4.0
1717
defusedxml==0.7.1; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
1818
deprecated==1.2.14; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
1919
diff-match-patch==20230430; python_version >= '3.7'
20-
discord.py==1.7.3
20+
discord.py==2.5.0
2121
django==4.2.4
2222
django-celery-beat==2.5.0
2323
django-hashid-field==3.3.7

0 commit comments

Comments
 (0)