variables.go 3.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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. }
  30. func InitTwitchClient() {
  31. TWITCH_CLIENT.Name = USERNAME
  32. TWITCH_CLIENT.ChannelMap = make(map[string]*IRC_CHANNEL)
  33. TWITCH_CLIENT.ChannelMap[USERNAME] = new(IRC_CHANNEL)
  34. TWITCH_CLIENT.ChannelMap[USERNAME].BroadCasterID = BROADCASTER_ID
  35. TWITCH_CLIENT.ChannelMap[USERNAME].Name = USERNAME
  36. TWITCH_CLIENT.ChannelMap[USERNAME].Type = 1
  37. }
  38. func InitCommands() {
  39. TextCommands["!monero"] = "43V6N2BpjvMYUthyqLioafZ2MQQviWEhvVTpp3hHc6LB48WYE8SsjrJKyyYzR3AYu2HkSXu8xsJhr7wdLsgSc8mGDDTkCrn"
  40. TextCommands["!nvim"] = "https://github.com/zveinn/nvim-config"
  41. TextCommands["!twitter"] = "https://twitter.com/keyb1nd"
  42. TextCommands["!github"] = "https://github.com/zveinn"
  43. TextCommands["!linkedin"] = "https://www.linkedin.com/in/keyb1nd/"
  44. TextCommands["!discord"] = "https://discord.com/invite/wJ5m3Y6ezq"
  45. TextCommands["!keyboard"] = "https://twitter.com/keyb1nd/status/1589688621619351552"
  46. TextCommands["!os"] = "Debian 12 xfce"
  47. TextCommands["!terminal"] = "qterminal + tmux"
  48. TextCommands["!editor"] = "nvim"
  49. TextCommands["!spec"] = "CPU( AMD Ryzen 9 3950X 16-Core Processor ) RAM( 32GB) GPU( GeForce RTX 2080 Ti )"
  50. TextCommands["!youtube"] = "https://www.youtube.com/@keyb1nd"
  51. // VPN RELATED
  52. TextCommands["!freetrial"] = "All new accounts get 24 hours free trial > https://www.nicelandvpn.is/#/register"
  53. TextCommands["!vpn"] = "NicelandVPN has a 24 hour free trial + anonymous accounts (no credit card info needed) >>> https://nicelandvpn.is >>> https://twitter.com/nicelandvpn >>> https://discord.gg/7Ts3PCnCd9"
  54. TextCommands["!commands"] = "!top10 !roll !quote !vpn !freetrial !youtube !nvim !twitter !discord !roll !keyboard !spec !time !tts !terminal !keyboard !os !editor"
  55. }
  56. func CheckCustomReward(U *User, msg tirc.PrivateMessage) (success bool) {
  57. // if msg.CustomRewardID == "8444968a-be3c-4d89-b6e7-dbbdedf64e1f" {
  58. // go PlayTTS(msg.Message)
  59. // return true
  60. // }
  61. if msg.CustomRewardID == "323be4d7-63e6-4f2d-ad99-246f19c9ebd7" {
  62. _ = IncrementUserPoints(U, 100)
  63. TWITCH_CLIENT.ReplyToUser(msg.User.DisplayName, "Redeemed 100 points!", "")
  64. return true
  65. } else if msg.CustomRewardID == "601576ec-b3ad-4f2d-8bba-a8b79f2f7e14" {
  66. _ = IncrementUserPoints(U, 500)
  67. TWITCH_CLIENT.ReplyToUser(msg.User.DisplayName, "Redeemed 500 points!", "")
  68. return true
  69. } else if msg.CustomRewardID == "a8b676f0-0dc3-441d-a2dc-7cb0de3499ee" {
  70. _ = IncrementUserPoints(U, 1000)
  71. TWITCH_CLIENT.ReplyToUser(msg.User.DisplayName, "Redeemed 1000 points!", "")
  72. return true
  73. } else if msg.CustomRewardID == "a1b6ad63-a3da-492d-b37f-ad068997bd70" {
  74. _ = IncrementUserPoints(U, 5000)
  75. TWITCH_CLIENT.ReplyToUser(msg.User.DisplayName, "Redeemed 5000 points!", "")
  76. return true
  77. }
  78. return
  79. }