Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
a41a7e5
disable sending urls to reading
Caden64 May 5, 2024
dfce3c9
Merge pull request #1 from Caden64/toml
Caden64 May 5, 2024
725f7eb
Merge branch 'Topazstix:main' into main
Caden64 May 5, 2024
b006179
start of porting to using poise
Caden64 May 5, 2024
b7d0ff3
adds role on join
Caden64 May 5, 2024
ba807ec
refactor
Caden64 May 5, 2024
f1e6919
set to version 2 and add GPL to Cargo.toml
Caden64 May 6, 2024
b086efd
add help command
Caden64 May 6, 2024
f915583
add autocomplete and role check
Caden64 May 6, 2024
b853cd7
only read config file once
Caden64 May 7, 2024
7c0b011
adds uni role and removes default role
Caden64 May 8, 2024
d686c3b
remove mlc from internal name and add maintainers in Cargo.toml
Caden64 May 8, 2024
3455a0f
add dockerfile
Caden64 May 8, 2024
5acdc8b
added docker and ready notice
Caden64 May 9, 2024
50c1089
removes old role and add new role and nickname properly
Caden64 May 9, 2024
946c056
mention roles when things go wrong
Caden64 May 9, 2024
774fc20
don't respond normally if something goes wrong and have more understa…
Caden64 May 10, 2024
a0f52ce
makes sure the commands take place in the enroll channel
Caden64 May 10, 2024
b21ce17
reduce repeated code
Caden64 May 10, 2024
b2e20b2
remove unnecessary code and test out an acknowledgment command to et …
Caden64 May 12, 2024
8aa64f6
sets up groundwork for users to acknowledge the rules
Caden64 May 12, 2024
da10d3a
gets voice data
Caden64 May 12, 2024
d00b1d1
figure out if the meeting has started and if it has ended
Caden64 May 13, 2024
b8a9f15
compiles now
Caden64 May 14, 2024
483cef6
gets all current users in the discord server
Caden64 May 14, 2024
0228ea7
thought about storage no more
Caden64 May 14, 2024
f8bb50e
compile lol
Caden64 May 14, 2024
97ed471
shorter lines
Caden64 May 14, 2024
c300968
saves data in *almost* the same way
Caden64 May 14, 2024
c2726a2
add points value and make the data save when run with docker compose
Caden64 May 14, 2024
42a9cfc
comments
Caden64 May 15, 2024
2edbf23
rust fmt
Caden64 May 25, 2024
83b6167
can award points now
Caden64 Jun 2, 2024
e33bbd9
checks if it was successful or not
Caden64 Jun 2, 2024
40baa21
added way to remove points from user
Caden64 Jun 2, 2024
738a5e7
make the event_handler file easier to manage and add in what server t…
Caden64 Jun 2, 2024
83fb566
rust fmt and added better join message
Caden64 Jun 2, 2024
e234994
changed named and added message for potential error
Caden64 Jun 2, 2024
d994100
remove unused code
Caden64 Jun 2, 2024
9c8753f
full feature parity with Topazstix's version
Caden64 Jun 3, 2024
3588685
With docs
Caden64 Jun 3, 2024
560ab14
Merge pull request #2 from Caden64/poise
Caden64 Jun 3, 2024
391f736
Update Example.config.toml to be reflective of true config files
Caden64 Jun 3, 2024
1a95782
Add new admin role check
Caden64 Jun 8, 2024
ff540e3
Refactor code to implement role-based autocomplete
Caden64 Jun 8, 2024
d50f8be
start with being able to edit user
Caden64 Jun 8, 2024
9a796d6
Refactor code and enhance user registration flow
Caden64 Jun 9, 2024
254377a
potentially edit user works??
Caden64 Jun 10, 2024
9c257f6
Working basic bot
Caden64 Jun 14, 2024
cac2d90
put timing things in README.md
Caden64 Jul 24, 2024
1ee081e
Add feature toggle for sending news and refactored user checks
Caden64 Aug 18, 2024
f35d7b8
Merge remote-tracking branch 'origin/main'
Caden64 Aug 18, 2024
272d380
Merge branch 'refs/heads/poise'
Caden64 Aug 18, 2024
bed3676
added basic rss functionality
Caden64 Aug 18, 2024
7918658
update git ignore for current project status
Caden64 Aug 18, 2024
32a5966
rss feature nearly complete just needs to grab data forever now and s…
Caden64 Aug 18, 2024
9426245
refactor with some rustfmt
Caden64 Aug 18, 2024
7fdfcb4
just some final changes and some testing before deployment
Caden64 Aug 18, 2024
b00df8b
Refactor RSS command error handling and scheduling
Caden64 Aug 19, 2024
3194102
start of enum roles
Caden64 Aug 31, 2024
f5b92d3
now if build.rs would run always
Caden64 Sep 1, 2024
76d6e26
more testing required
Caden64 Sep 1, 2024
7f80d6e
do more with enums
Caden64 Sep 2, 2024
5a96c1f
gotta love enums not working how I want them to
Caden64 Sep 2, 2024
487566c
add debug command
Caden64 Sep 29, 2024
9eaf400
reformat to rust spec and add way for admins to register users
Caden64 Sep 29, 2024
b8f7804
update enroll.rs to give more meaningful error messages
Caden64 Sep 29, 2024
95768cc
add more rss feeds to the example config.toml
Caden64 Sep 29, 2024
74eb889
update dependencies
Caden64 Sep 30, 2024
a8892b0
Merge branch 'main' into enum
Caden64 Sep 30, 2024
6443d52
working build time enum bs
Caden64 Sep 30, 2024
a5bbbbb
remove unnecessary code and make better error messages for debugging …
Caden64 Sep 30, 2024
7848d99
update version number of binary
Caden64 Sep 30, 2024
d919f0a
add an example roles.toml file
Caden64 Sep 30, 2024
023edc0
remove old roles.yaml file
Caden64 Sep 30, 2024
97b38a8
Rust fmt of project
Caden64 Sep 30, 2024
3a45a34
Merge pull request #4 from Caden64/main
Topazstix Dec 23, 2024
6ec8944
fix build.rs to be just better
Caden64 Dec 23, 2024
afd4386
remove extraneous features
Caden64 Dec 23, 2024
3d984fb
clean up pt.2
Caden64 Dec 23, 2024
843ee9a
add news functionality & general clean up
Caden64 Dec 24, 2024
52dfeab
check url
Caden64 Dec 24, 2024
d43adee
fix url regex
Caden64 Dec 24, 2024
4fffc17
fix url regex
Caden64 Dec 24, 2024
2c5246e
Merge remote-tracking branch 'origin/caden-merge' into caden-merge
Caden64 Dec 24, 2024
7c13c8a
fix url regex
Caden64 Dec 24, 2024
b2abb39
Fix website regex to actually work
Caden64 Dec 27, 2024
97bb531
be able to dump a channels url's if it's in debug mode
Caden64 Jan 12, 2025
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
8 changes: 6 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,9 @@
.env
Secrets*.toml
Cargo.lock
enrollments*.json
config.toml
enrollments.json
config.toml
.vscode
.idea
*.config.toml
roles.toml
29 changes: 17 additions & 12 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
[package]
name = "mlc_crab_bot"
version = "1.0.0"
name = "crab_bot"
version = "2.1.0"
edition = "2021"
license = "GPL-3"
authors = ["Caden64", "Topazstix"]

[dependencies]
serenity = { version = "0.11.5", default-features = false, features = ["client", "gateway", "rustls_backend", "model"] }
tokio = { version = "1.26.0", features = ["macros", "rt-multi-thread"] }
regex = "1.7.0"
dotenv = "0.15.0"
tracing = "0.1.37"
serde = "1.0.188"
serde_json = "1.0.105"
google-sheets4 = "5.0.3+20230119"
toml = "0.8.9"
serde_derive = "1.0.196"
poise = "0.6.1"
serde = { version = "1.0.216", features = ["derive"] }
tokio = { version = "1.40.0", features = ["rt-multi-thread"] }
toml = "0.8.19"
serde_json = "1.0.134"
regex = "1.11.1"
rand = "0.8.5"
meta_fetcher = "0.1.1"

[build-dependencies]
edres = "0.6.0"
serde = { version = "1.0.216", features = ["derive"] }
toml = "0.8.19"
134 changes: 134 additions & 0 deletions Example.config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
[TOKEN]
discord_token ="DISCORD TOKEN HERE"

[GUILD.MAIN]
GUILD_ID = 1 # the home server of the bot
PRESIDENT = 1 # who ever is in change of the bot

[GUILD.PARTNERS.a name or something]
id = 1
name = "Name of partner"
SEND_NEWS = true # whether the "partner" want's to receive the news posted or not
NEWS_CHANNEL = 1

[ROLES.PUBLIC]
# The supported roles id's that can be given to users
ROLE1 = 1
ROLE2 = 1
other = 1

[ROLES.PRIVATE]
# the default role given when a user accepts the rules
REMOVE_ROLE_ID = 1
# the role who should be notified if something goes wrong in registration (caused by user having higher permission than the bot or already existing in enrollments.json)
ADMIN_ROLE_ID = 1

[CHANNELS]
# Channel where user will enroll
ENROLL_CHANNEL_ID = 1
# A voice channel where the meetings happen
MEETING_CHANNEL_ID = 1
# where the news urls are posted to be shared
READING_CHANNEL_ID = 1

# currently not used and can be removed
[FEATURES]
SEND_NEWS = true

# to get news
[RSS.FEED.mandiant]
url = "https://www.mandiant.com/resources/blog/rss.xml"
[RSS.FEED.troyhunt]
url = "https://feeds.feedburner.com/TroyHunt"
[RSS.FEED.thehackernews]
url = "https://feeds.feedburner.com/TheHackersNews"
[RSS.FEED.techspot]
url = "https://www.techspot.com/backend.xml"
[RSS.FEED.tomsguide]
url = "https://www.tomsguide.com/feeds/all"
[RSS.FEED.malwarebytes]
url = "https://www.malwarebytes.com/blog/Feed/index.xml"
[RSS.FEED.acronis]
url = "https://advisories.feedly.com/acronis/feed.json"
[RSS.FEED.BleepingComputer]
url = "http://www.bleepingcomputer.com/feed"
[RSS.FEED.CISECURITY]
url = "https://www.cisecurity.org/feed/advisories"
[RSS.FEED.CERT]
url = "http://www.kb.cert.org/vulfeed"
[RSS.FEED.CISAKNOWNVULNS]
url = "https://advisories.feedly.com/cisa/exploitedCve/feed.json"
[RSS.FEED.CISAALERTS]
url = "https://www.us-cert.gov/ncas/alerts.xml"
[RSS.FEED.CISACURRENTACTIVITY]
url = "http://www.us-cert.gov/current/index.rdf"
[RSS.FEED.CYBERADVISORY]
url = "https://www.cisa.gov/uscert/ncas/alerts.xml"
[RSS.FEED.CISCOTALOSDISCLOSEDVULNS]
url = "https://advisories.feedly.com/talos/disclosed/feed.json"
[RSS.FEED.PACKETSTORM]
url = "http://rss.packetstormsecurity.com/files/tags/code_execution"
[RSS.FEED.CXSECURITY]
url = "http://securityreason.com/rss/SecurityAlert"
[RSS.FEED.DARKREADING]
url = "http://www.darkreading.com/rss/all.xml"
[RSS.FEED.DELLADVISORY]
url = "https://advisories.feedly.com/dell/feed.json"
[RSS.FEED.ELASTICSTACK]
url = "https://discuss.elastic.co/c/announcements/security-announcements/31.rss"
[RSS.FEED.FULLDISCLOUSRE]
url = "http://seclists.org/rss/fulldisclosure.rss"
[RSS.FEED.GitHubADVISORYDATABASE]
url = "https://advisories.feedly.com/github/advisories/feed.json"
[RSS.FEED.GOOGLEZERODAY]
url = "https://advisories.feedly.com/google/0day/feed.json"
[RSS.FEED.GOOGLEANDROIDSECURITY]
url = "https://advisories.feedly.com/google/android/feed.json"
[RSS.FEED.CHROMESECURITY]
url = "https://advisories.feedly.com/google/chrome/feed.json"
[RSS.FEED.ICSADVISORY]
url = "https://www.cisa.gov/uscert/ics/advisories/advisories.xml"
[RSS.FEED.INTHEWILD]
url = "https://advisories.feedly.com/inthewild/exploitations/feed.json"
[RSS.FEED.INTHEWILDEXPLOITS]
url = "https://advisories.feedly.com/inthewild/exploits/feed.json"
[RSS.FEED.JVNRSS]
url = "https://jvn.jp/en/rss/jvn.rdf"
[RSS.FEED.KREBS]
url = "http://krebsonsecurity.com/feed/"
[RSS.FEED.MICROSOFTSECURITYADVISORY]
url = "https://advisories.feedly.com/microsoft/feed.json"
[RSS.FEED.MICROSOFTSECURITYBLOG]
url = "http://blogs.technet.com/mmpc/rss.xml"
[RSS.FEED.MOZILLASECURITYADVISORY]
url = "https://advisories.feedly.com/mozilla/feed.json"
[RSS.FEED.NVD]
url = "https://advisories.feedly.com/nvd-cve/feed.json"
[RSS.FEED.NETAPPSECURITYADVISORY]
url = "https://advisories.feedly.com/netapp/feed.json"
[RSS.FEED.NVIDIAPRODUCTSECURITY]
url = "https://advisories.feedly.com/nvidia/feed.json"
[RSS.FEED.PHORONIX]
url = "http://feeds.feedburner.com/Phoronix"
[RSS.FEED.REDHATSECURITYUPDATES]
url = "https://advisories.feedly.com/redhat/feed.json"
[RSS.FEED.SCHNEIERONSECURITY]
url = "http://www.schneier.com/blog/index.rdf"
[RSS.FEED.SECURELIST]
url = "https://securelist.com/feed"
[RSS.FEED.ARSTECHNICA]
url = "http://arstechnica.com/security/feed"
[RSS.FEED.QUALYS]
url = "https://community.qualys.com/blogs/securitylabs/feeds/posts"
[RSS.FEED.SOPHOS]
url = "https://blogs.sophos.com/feed"
[RSS.FEED.CXSECURITYEXPLOIT]
url = "http://securityreason.com/rss/ExploitAlert"
[RSS.FEED.STATEOfSECURITY]
url = "http://feeds.feedburner.com/tripwire-state-of-security"
[RSS.FEED.TRENDLABSTHREATINTEL]
url = "http://feeds.trendmicro.com/Anti-MalwareBlog"
[RSS.FEED.ZDIADVISORY]
url = "https://advisories.feedly.com/zdi/feed.json"
[RSS.FEED.ZOOMSECURITY]
url = "https://advisories.feedly.com/zoom/feed.json"
Loading