Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto icon changer #61

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
916ffa1
chore: start updating dependencies
ivandardi Jun 7, 2023
e9c5a8a
chore: continue fixing compile errors and formatting strings
ivandardi Jun 19, 2023
c368623
chore: delete automatic deployment workflows for now
ivandardi Jun 19, 2023
8e89a96
chore: update poise to latest version
ivandardi Jun 26, 2023
b8bf16c
chore: update .gitignore
ivandardi Jun 26, 2023
d81af57
chore: update README.md
ivandardi Jun 26, 2023
b00dbac
chore: remove sqlx prepare from CI
ivandardi Jul 4, 2023
4276b9b
Merge branch 'chore/migrate-from-flyio-to-shuttlers' into main
ivandardi Jul 4, 2023
2f0e367
fix: add missing await to the set_activity method call
ivandardi Jul 6, 2023
f5327dc
feat: add Github Actions deployment
ivandardi Jul 6, 2023
64339b5
fix: match environment name with the one that's set up on Github
ivandardi Jul 6, 2023
f975360
chore: rename project to avoid naming collisions
ivandardi Jul 6, 2023
f63ef72
fix: update CI workflow to newer checkout action versions
ivandardi Jul 6, 2023
70558a3
fix: silence warnings on potentially incomplete godbolt module
ivandardi Jul 6, 2023
f67d405
clippy: implement clippy suggestions
ivandardi Jul 6, 2023
19c8063
chore: add a bunch of server icons to the assets folder
ivandardi Jul 12, 2023
e04511c
refactor: move the check_is_moderation check into its own module
ivandardi Jul 12, 2023
b38ed1f
chore: start implementing modmail
ivandardi Jul 17, 2023
e997b04
feat: reimplement /report command
ivandardi Jul 18, 2023
b3f871f
`?godbolt` - add missing line break (#4)
Astroide Jul 18, 2023
66e55e4
fix: add report command to list of commands
ivandardi Jul 18, 2023
cfa29eb
fix: make failed deployment not mark GA job as successful
ivandardi Jul 18, 2023
c665982
chore: continue implementing the report command
ivandardi Jul 19, 2023
be6b176
feat: migrate to Tokio RWLock instead
ivandardi Jul 21, 2023
993bede
feat: rename report command to modmail
ivandardi Jul 21, 2023
f0a3763
chore: update dependencies
ivandardi Jul 21, 2023
76a850c
fix: revert build command changes
ivandardi Jul 21, 2023
ee0a017
feat: reword modmail command away from report wording
ivandardi Jul 21, 2023
fad71da
chore: move commands to an Utility category instead
ivandardi Jul 21, 2023
c54615b
hotfix: upload forgotten patch commit that fixes import refactoring e…
ivandardi Jul 21, 2023
125cc99
fix: update labels for help text to be more friendly
ivandardi Jul 21, 2023
1fc7d38
feat: add modmail_setup command
ivandardi Jul 21, 2023
6892910
fix: register modmail_setup command
ivandardi Jul 21, 2023
9f0ed18
Bugfixes by danielrab (#5)
danielrab Jul 25, 2023
2bd9097
feat: add /selftimeout command
melothemarten Aug 22, 2023
21933f7
feat: register /selftimeout comand
melothemarten Aug 22, 2023
c578a3f
chore: add confirmation message to selftimeout command
melothemarten Aug 22, 2023
64b6318
chore: update shuttle.rs version
melothemarten Aug 22, 2023
d0d49e3
feat: improve self-timeout command by adding granular duration
melothemarten Sep 5, 2023
e1e41ac
fix: don't add an extra hour to /selftimeout if the hour duration isn…
melothemarten Sep 5, 2023
f03f235
fix: convert duration of /selftimeout to seconds
melothemarten Sep 5, 2023
800e1b8
feat: add right click context menu for opening modmails
melothemarten Sep 5, 2023
4a4b35e
fix: register new modmail action commands
melothemarten Sep 5, 2023
f732ecc
add `ferrisballSweat` as a prefix (#12)
bend-n Oct 21, 2023
788111a
Fix /selftimeout parameter handling (#14)
Colonial-Dev Nov 15, 2023
bbb0b9c
fix: ignore Unknown Message error (#22)
TestingPlant Feb 12, 2024
cf42d49
Update to serenity 0.12 (#18)
wackbyte May 1, 2024
56633af
Use `.mention()` in modmail thread message (#24)
wackbyte May 1, 2024
849901a
Disallow users from inviting others to private modmail threads (#25)
wackbyte May 1, 2024
6263afc
fix: Make users not able to invite others into modmail threads
melothemarten May 1, 2024
cb0509f
Missing code block error now uses code blocks itself (#19)
ChaiTRex May 1, 2024
d3998ee
Improved error message when bot can't enter modmail channel (#21)
ChaiTRex May 1, 2024
54fcbd2
fixes `)};{(` and other fun (#27)
bend-n May 1, 2024
b6e0544
feat: update checkout action
melothemarten May 1, 2024
ecdd5e7
fix: update Rust version when deploying
melothemarten May 1, 2024
7f26053
fix: print cargo and rustc versions when updating Rust
melothemarten May 1, 2024
e552a3b
feat: update shuttle version
melothemarten May 1, 2024
7d880b2
fix #27 breaking emojis (#28)
bend-n May 3, 2024
17a1650
Disallow mentions by default (#16)
wackbyte May 4, 2024
7455f78
Revert the formatting part of the syn wrap change (#30)
Noratrieb May 22, 2024
c80b355
feat: add automatic server icon change every 24-48h
melothemarten Jul 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 0 additions & 39 deletions .env.example

This file was deleted.

33 changes: 5 additions & 28 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
on: [push, pull_request]
on: [ push, pull_request ]

name: CI

env:
SQLX_OFFLINE: true

jobs:
test:
name: Check Suite
Expand All @@ -15,16 +12,13 @@ jobs:
name:
- stable
- beta
- nightly
- macOS
- Windows
- no features

include:
- name: beta
toolchain: beta
- name: nightly
toolchain: nightly
- name: macOS
os: macOS-latest
- name: Windows
Expand All @@ -33,40 +27,23 @@ jobs:
feature_flags: --no-default-features

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.toolchain || 'stable' }}
override: true
- run: cargo check ${{ matrix.feature_flags || '--all-features' }}

sqlx:
name: SQLx prepare
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: cargo install sqlx-cli
- run: DATABASE_URL=sqlite://database.sqlite sqlx database setup
- run: DATABASE_URL=sqlite://database.sqlite cargo sqlx prepare
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Update sqlx-data.json

fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
toolchain: stable
override: true
- run: rustup component add rustfmt
- run: cargo fmt --all -- --check
Expand All @@ -75,7 +52,7 @@ jobs:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
profile: minimal
Expand Down
53 changes: 43 additions & 10 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,48 @@
name: Fly.io Deploy
name: "shuttle.rs deploy prod"

on:
push:
branches:
- main
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
- "main"

jobs:
deploy:
name: Deploy app
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy --remote-only
runs-on: "ubuntu-latest"
environment: "production"
steps:
- name: "Checkout repository"
uses: actions/checkout@v4

- name: "Update Rust version"
run: |
rustup update
rustc --version
cargo --version

- name: "Install shuttle.rs CLI"
run: |
# using cargo-binstall because it is faster to get shuttle-cli binary
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
cargo binstall -y --locked cargo-shuttle

- name: "Log into shuttle.rs"
run: |
cargo shuttle login --api-key ${{ secrets.SHUTTLE_DEPLOY_KEY }}

- name: "Set up cargo cache"
uses: Swatinem/rust-cache@v2

- name: "Create Secrets.toml file"
run: |
echo "# From secret store" >> Secrets.toml
echo "DISCORD_TOKEN=\"${{ secrets.DISCORD_TOKEN }}\"" >> Secrets.toml
echo "# From env var store" >> Secrets.toml
echo "DISCORD_GUILD=\"${{ vars.DISCORD_GUILD }}\"" >> Secrets.toml
echo "APPLICATION_ID=\"${{ vars.APPLICATION_ID }}\"" >> Secrets.toml
echo "MOD_ROLE_ID=\"${{ vars.MOD_ROLE_ID }}\"" >> Secrets.toml
echo "RUSTACEAN_ROLE_ID=\"${{ vars.RUSTACEAN_ROLE_ID }}\"" >> Secrets.toml
echo "MODMAIL_CHANNEL_ID=\"${{ vars.MODMAIL_CHANNEL_ID }}\"" >> Secrets.toml

- name: "Deploy to shuttle.rs"
run: |
cargo shuttle deploy | awk '!/Database URI.*?$/'
27 changes: 23 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@
/target
/.env
/database
/database.sqlite*
# Generated by Cargo
# will have compiled files and executables
debug/
target/

# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
Cargo.lock

# These are backup files generated by rustfmt
**/*.rs.bk

# MSVC Windows builds of rustc generate these, which store debugging information
*.pdb

# Misc secret files
.env
.*/
Secrets.toml
Secrets.dev.toml

# Allow the .github folder
!.github/
Loading
Loading