variables.go 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. package main
  2. import tirc "github.com/gempir/go-twitch-irc/v4"
  3. // FILES
  4. // X == oauth token
  5. // XR == oauth refresh token
  6. // REQUIRED .ENV VARIABLES
  7. // TWITCH_KEY --- this variable is set automatically
  8. // CLIENT_ID --- client ID for twitch API
  9. // CLIENT_SECRET --- client secret for twitch API
  10. // DB --- the database connection string to your mongoDB
  11. var (
  12. USERNAME = "keyb1nd_"
  13. BROADCASTER_ID = "704389637"
  14. )
  15. func InitMP3Map() {
  16. MP3Map["e7364edf-c725-45e5-9938-3fbd7659fd07"] = "herewegoagain"
  17. MP3Map["ae16a19b-5bea-4407-838d-c2895d41db6c"] = "ohmygod"
  18. MP3Map["c63ecae5-2183-4b39-a5a2-6be8150732ea"] = "thisistheway"
  19. MP3Map["d60c042f-3540-4fc3-aa8a-e42617815880"] = "developers"
  20. MP3Map["cd14e9cd-73fc-4dec-9c60-6e267082351f"] = "aya-short"
  21. MP3Map["ebe70cf1-340e-4753-872f-281aa49f8505"] = "uwu-long"
  22. MP3Map["14537722-6db9-4e89-bc3e-89c7e7e19e91"] = "uwu"
  23. MP3Map["1ef58611-e4b4-4f9c-a96e-e8a333b1e0e7"] = "araara"
  24. MP3Map["aadbb1ef-c995-4ca8-b720-8dc7758389ce"] = "onichan"
  25. MP3Map["0878e53e-67cd-47d1-89a1-91cc241d9412"] = "gnupluslinux"
  26. MP3Map["2a174cdd-a444-434e-af31-9e6a598944de"] = "come-after-you"
  27. MP3Map["5a78d388-6757-422b-a348-9ce983f34cb3"] = "hey-listen"
  28. MP3Map["1594a455-4a84-4a8b-a562-ac830c423d81"] = "excellent"
  29. MP3Map["b714ac5a-e6a4-4cf5-9ea0-385c67a168b8"] = "blabla"
  30. }
  31. func InitTwitchClient() {
  32. TWITCH_CLIENT.Name = USERNAME
  33. TWITCH_CLIENT.ChannelMap = make(map[string]*IRC_CHANNEL)
  34. TWITCH_CLIENT.ChannelMap[USERNAME] = new(IRC_CHANNEL)
  35. TWITCH_CLIENT.ChannelMap[USERNAME].BroadCasterID = BROADCASTER_ID
  36. TWITCH_CLIENT.ChannelMap[USERNAME].Name = USERNAME
  37. TWITCH_CLIENT.ChannelMap[USERNAME].Type = 1
  38. }
  39. func InitCommands() {
  40. // TextCommands["!monero"] = "43V6N2BpjvMYUthyqLioafZ2MQQviWEhvVTpp3hHc6LB48WYE8SsjrJKyyYzR3AYu2HkSXu8xsJhr7wdLsgSc8mGDDTkCrn"
  41. TextCommands["!nvim"] = "https://github.com/zveinn/dotfiles"
  42. TextCommands["!dotfiles"] = "https://github.com/zveinn/dotfiles"
  43. TextCommands["!x"] = "https://x.com/keyb1nd"
  44. TextCommands["!github"] = "https://github.com/zveinn"
  45. TextCommands["!linkedin"] = "https://www.linkedin.com/in/keyb1nd/"
  46. TextCommands["!discord"] = "https://discord.com/invite/wJ5m3Y6ezq"
  47. TextCommands["!keyboard"] = "wooting.io"
  48. TextCommands["!os"] = "All of them."
  49. TextCommands["!terminal"] = "wezterm + tmux"
  50. TextCommands["!editor"] = "nvim"
  51. TextCommands["!youtube"] = "https://www.youtube.com/@keyb1nd?sub_confirmation=1"
  52. TextCommands["!lurk"] = "ABSOLUTELY NOT ... LURKING IS NOT ALLOWED IN HERE"
  53. TextCommands["!signal"] = "https://signal.group/#CjQKILCHWDqtfKErs-6yV8i0kQHhScDTL4wQ2mW7JYoQoBLsEhC7R4AqmLxdxwdRa0fWK1tD"
  54. // VPN RELATED
  55. TextCommands["!freetrial"] = "All new accounts get 24 hours free trial > https://www.tunnels.is"
  56. TextCommands["!vpn"] = "Tunnels.is >> Advanced Networking Utility >> 24/h Free Trial >> https://tunnels.is"
  57. TextCommands["!vpndiscord"] = "Tunnels.is DISCORD: https://discord.com/invite/7Ts3PCnCd9"
  58. TextCommands["!cmd"] += "!tts !roll !points !quote !top10"
  59. TextCommands["!commands"] += "!tts !roll !points !quote !top10"
  60. for i := range TextCommands {
  61. TextCommands["!cmd"] += " " + i
  62. TextCommands["!commands"] += " " + i
  63. }
  64. }
  65. func CheckCustomReward(U *User, msg tirc.PrivateMessage) (success bool) {
  66. if msg.CustomRewardID == "8444968a-be3c-4d89-b6e7-dbbdedf64e1f" {
  67. go PlaceEventOnSoundQueue("tts", msg.Message)
  68. return true
  69. }
  70. if msg.CustomRewardID == "323be4d7-63e6-4f2d-ad99-246f19c9ebd7" {
  71. _ = IncrementUserPoints(U, 100)
  72. TWITCH_CLIENT.ReplyToUser(msg.User.DisplayName, "Redeemed 100 points!", "")
  73. return true
  74. } else if msg.CustomRewardID == "601576ec-b3ad-4f2d-8bba-a8b79f2f7e14" {
  75. _ = IncrementUserPoints(U, 500)
  76. TWITCH_CLIENT.ReplyToUser(msg.User.DisplayName, "Redeemed 500 points!", "")
  77. return true
  78. } else if msg.CustomRewardID == "a8b676f0-0dc3-441d-a2dc-7cb0de3499ee" {
  79. _ = IncrementUserPoints(U, 1000)
  80. TWITCH_CLIENT.ReplyToUser(msg.User.DisplayName, "Redeemed 1000 points!", "")
  81. return true
  82. } else if msg.CustomRewardID == "a1b6ad63-a3da-492d-b37f-ad068997bd70" {
  83. _ = IncrementUserPoints(U, 5000)
  84. TWITCH_CLIENT.ReplyToUser(msg.User.DisplayName, "Redeemed 5000 points!", "")
  85. return true
  86. }
  87. return
  88. }