Created
July 19, 2017 18:42
-
-
Save z64/989620ef543afe5c2ea9b9732423f5da to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Powerbot | |
module DiscordEvents | |
module Spong | |
extend Discordrb::EventContainer | |
CHANNELS = [ | |
226941225339584513, | |
225375815087554563 | |
] | |
message(in: CHANNELS) do |event| | |
next unless rand(1..50) == 1 | |
meme = event.message.content | |
.chars | |
.map { |c| [c.downcase, c.upcase].sample } | |
.join | |
m = event.channel.send_embed( | |
meme, | |
{ | |
image: { | |
url: 'http://i0.kym-cdn.com/entries/icons/original/000/022/940/spongebobicon.jpg' | |
} | |
} | |
) | |
sleep 25 | |
m.delete | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment