Skip to content

Commit

Permalink
removed supercow list
Browse files Browse the repository at this point in the history
  • Loading branch information
WhereIsX committed Aug 3, 2021
1 parent aafbbb4 commit 7867cf7
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -6,3 +6,4 @@ binaries/
licenses/
*.db
.history/
2021*
4 changes: 0 additions & 4 deletions non_registered_super_cows

This file was deleted.

1 change: 1 addition & 0 deletions run.cr
Expand Up @@ -17,6 +17,7 @@ parser = OptionParser.parse do |parser|
description: "silent mode: bot does not respond, only `puts` to terminal"
) {
silent_mode = true
puts "🪄 SILENCIO! 🪄"
}
end

Expand Down
3 changes: 2 additions & 1 deletion src/chatty/chatty.cr
Expand Up @@ -116,7 +116,8 @@ class Chatty

def answer_ping
if @silent_mode
@client.puts "PONG :tmi.twitch.tv\n"
@client.puts "PONG :tmi.twitch.tv \r\n"
@client.flush
# say "have you joined the flock yet? !start_record so we can start feeding you peas :>"
else
say PONG_FACTS[Random.rand(PONG_FACTS.size)] # "PONG" :>
Expand Down
9 changes: 4 additions & 5 deletions src/chatty/commands/shoutout.cr
Expand Up @@ -21,8 +21,7 @@ Command.new(
"Client-ID" => ENV["TWITCH_APP_ID"],
"Authorization" => "Bearer #{ENV["TWITCH_APP_ACCESS_TOKEN"]}",
}
# async?
# spawn do

result = HTTP::Client.get(
url: URI.new(
scheme: "https",
Expand All @@ -32,10 +31,10 @@ Command.new(
),
headers: headers,
)
# WHAT IF THEY NEVER GET BACK TO US??

if !result.success?
p! result
raise "channel request failed with: #{result.status_code} "
p! ":( we failed"
next "go check out twitch.tv/#{channel_name} right meow! they're kinda magical"
end
data = JSON.parse(result.body).dig("data") # => JSON::Any
user = data.as_a.find { |user| user["display_name"].to_s.downcase == channel_name.downcase }
Expand Down
4 changes: 3 additions & 1 deletion src/chatty/commands/water.cr
Expand Up @@ -6,7 +6,9 @@ cd = 1

Command.new(
name: "!water",
description: "attempts to water a named duck (earns #{earnings} peas, cooldown #{cd} min); !water <ducky_name>"
description: "attempts to water a named duck \
(earns #{earnings} peas, cooldown #{cd} min); \
!water <ducky_name>"
) do |ircm|
# TBD: randomly picks a duck and tags them, asking them to drink
# words: ("!water", "duckyname")
Expand Down

0 comments on commit 7867cf7

Please sign in to comment.