A discord bot for leetcode study group, share member's latest AC submission automatically.
LeetCode-Alert-Bot © 2023 by Anthony Lin is licensed under CC BY-NC 4.0
- Clone this repo.
- Put your discord bot token in
.env
file asDCToken
. - Put the channel id you want to recieve the alert ac submissions in
.env
asAlertChannelId
. - Put the users you want to track in
.env
asUsers
, seperated by line. - Run
go run main.go
to start the bot.
! help
to get the help message.! ask status <username>
to get the user's AC status.! ask ac <username>
to get the latest AC submission of the user.! ask users
to get the list of users are being tracked.! add <username>
to add user to traced list.
> ! help
Commands:
! ask status [username]
! ask ac [username]
! ask users
! help
! add [username]
> ! ask status luckyanthonyan
All: 351
Easy: 120
Medium: 177
Hard: 54
> ! ask ac luckyanthonyan
luckyanthonyan Latest Accepted Submission
2023-12-29 23:58:33
Minimum Difficulty of a Job Schedule
> ! ask users
Current Folowed Users:
luckyanthonyan
apple912162
hank55663
codingiscool666
alan8585
After add user, the bot will update the tracedList.txt
.
> ! add alan8585
Add new traced user successfully.