variables.go 4.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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["!x"] = "https://x.com/keyb1nd"
  43. TextCommands["!github"] = "https://github.com/zveinn"
  44. TextCommands["!linkedin"] = "https://www.linkedin.com/in/keyb1nd/"
  45. TextCommands["!discord"] = "https://discord.com/invite/wJ5m3Y6ezq"
  46. TextCommands["!keyboard"] = "https://x.com/keyb1nd/status/1589688621619351552"
  47. TextCommands["!os"] = "Debian 12 kde"
  48. TextCommands["!terminal"] = "wezterm + tmux"
  49. TextCommands["!editor"] = "nvim"
  50. TextCommands["!spec"] = "... the best cpu. literally a super computer from space."
  51. TextCommands["!youtube"] = "https://www.youtube.com/@keyb1nd"
  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.nicelandvpn.is/#/register"
  56. TextCommands["!vpn"] = "Tunnels.is >> 24/h Free Trial >> Anonymous Accounts >> NO CARD INFO NEEDED! >>> https://tunnels.is"
  57. TextCommands["!vpndiscord"] = "Tunnels.is DISCORD: https://discord.com/invite/7Ts3PCnCd9"
  58. TextCommands["!commands"] = "lol.. just guess"
  59. }
  60. func CheckCustomReward(U *User, msg tirc.PrivateMessage) (success bool) {
  61. // if msg.CustomRewardID == "8444968a-be3c-4d89-b6e7-dbbdedf64e1f" {
  62. // go PlayTTS(msg.Message)
  63. // return true
  64. // }
  65. if msg.CustomRewardID == "323be4d7-63e6-4f2d-ad99-246f19c9ebd7" {
  66. _ = IncrementUserPoints(U, 100)
  67. TWITCH_CLIENT.ReplyToUser(msg.User.DisplayName, "Redeemed 100 points!", "")
  68. return true
  69. } else if msg.CustomRewardID == "601576ec-b3ad-4f2d-8bba-a8b79f2f7e14" {
  70. _ = IncrementUserPoints(U, 500)
  71. TWITCH_CLIENT.ReplyToUser(msg.User.DisplayName, "Redeemed 500 points!", "")
  72. return true
  73. } else if msg.CustomRewardID == "a8b676f0-0dc3-441d-a2dc-7cb0de3499ee" {
  74. _ = IncrementUserPoints(U, 1000)
  75. TWITCH_CLIENT.ReplyToUser(msg.User.DisplayName, "Redeemed 1000 points!", "")
  76. return true
  77. } else if msg.CustomRewardID == "a1b6ad63-a3da-492d-b37f-ad068997bd70" {
  78. _ = IncrementUserPoints(U, 5000)
  79. TWITCH_CLIENT.ReplyToUser(msg.User.DisplayName, "Redeemed 5000 points!", "")
  80. return true
  81. }
  82. return
  83. }