Twitch Chat Integration
Requirements:
Script:
Bot Example: (this is done in "Streamlabs Chatbot")
D:\Pokemon Assets\Essentials\17\twitch.txt is where the game reads the text file
(0) rescue nil; must be put before each code you want to run
Kernel.pbItemBall(:POTION) is the code for the game to run
Documentation:
P.E Wiki
Chatbot PDF
From Mcgriffin big WARNING!!:
To people reading this thread, please be very careful what you put in twitch.txt. Don't let any text from the Twitch chat end up in that file or you'll run the risk of letting people run harmful commands on your computer (e.g. formatting the disk, installing a keylogger, etc). To a first approximation eval is only safe for commands that you 100% wrote yourself.
Requirements:
- Streamlabs Chatbot Program
- Chatbot Twitch Account
- Pokemon Essentials
Script:
Code:
module Graphics
@old_update = method(:update)
module_function
def update
if File.exist?('twitch.txt') && File.size('twitch.txt') > 0
data = nil
File.open('twitch.txt') do |f| data = f.read end
File.delete('twitch.txt')
begin
eval(data)
rescue Exception
p $!.message
end
end
@old_update.call
end
end
Bot Example: (this is done in "Streamlabs Chatbot")
- Go to Commands
- Make a new command called "!additem"
- Edit everything else for the command
- in Response put $overwritefile("D:\Pokemon Assets\Essentials\17\twitch.txt","(0) rescue nil;Kernel.pbItemBall(:POTION)")
D:\Pokemon Assets\Essentials\17\twitch.txt is where the game reads the text file
(0) rescue nil; must be put before each code you want to run
Kernel.pbItemBall(:POTION) is the code for the game to run
Documentation:
P.E Wiki
Chatbot PDF
From Mcgriffin big WARNING!!:
To people reading this thread, please be very careful what you put in twitch.txt. Don't let any text from the Twitch chat end up in that file or you'll run the risk of letting people run harmful commands on your computer (e.g. formatting the disk, installing a keylogger, etc). To a first approximation eval is only safe for commands that you 100% wrote yourself.
Last edited: