Advertisement
Tbonetomtom

send message to discord from computer craft

May 25th, 2023
1,307
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.65 KB | None | 0 0
  1. -- discord hook : https://github.com/Wendelstein7/DiscordHook-CC
  2.  
  3. local DiscordHook = require("DiscordHook")
  4.  
  5. local success, hook = DiscordHook.createWebhook("https://discord.com/api/webhooks/")
  6. if not success then
  7.   error("Webhook connection failed! Reason: " .. hook)
  8.   end
  9.  
  10. local fish = true
  11. while true do  
  12.  
  13.   if redstone.getInput("left") then
  14.     if fish == true then
  15.       hook.send("<@&1110727813654401134> you need to mend your fishing rods", "Fish Bot 2000", "https://cdn.discordapp.com/attachments/359389959850819606/1110725486457405530/2Q.png")
  16.       fish = false
  17.     end
  18.     sleep(10)
  19.   else
  20.     fish = true
  21.     sleep(10)
  22.   end
  23. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement