All of this stuff is hardcoded and bad practice (especially the auddToken
- forget to remove it one time when committing and you're dead):
https://github.com/AudDMusic/RedditBot/blob/a82af307421f9ee3c6c82d33b16adc90b48fec82/main.go#L31-L52
You can and should put all of this in e.g. a .gitignore
d JSON config file:
{
"auddToken": "test",
"ravenDSN": "https://...:[email protected]/...",
"triggers": [
"whats the song", "what is the song", "whats this song", "what is this song",
"what song is playing", "what song is this", "what the song is playing", "what the song is this",
"whats the music", "what is the music", "whats this music", "what is this music",
"whats the track in this", "what is the track in this",
"recognizesong", "auddbot", "u/find-song"
],
"antiTriggers": [
"has been automatically removed", "your comment was removed",
"comment here with such low karma", "bot wants to find the best and worst bots"
],
"ignoreSubreddits": ["wallstreetbets"],
"replySettings": {
"mentionLinks": true,
"commentLinks": false,
"postLinks": false,
"mentionReplyAlways": true,
"commentReplyAlways": false,
"postReplyAlways": false
}
}
Then load this into your original variables. I don't know Go but I would be utterly horrified if there wasn't some JSON parser available.
enhancement good first issue