Class: Atig::Command::Spam
Instance Attribute Summary
Attributes inherited from Command
#api, #db, #gateway, #opts
Instance Method Summary
collapse
Methods inherited from Command
#find_by_tid
Constructor Details
#initialize(*args) ⇒ Spam
Returns a new instance of Spam.
8
|
# File 'lib/atig/command/spam.rb', line 8
def initialize(*args); super end
|
Instance Method Details
#action(target, mesg, command, args) ⇒ Object
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# File 'lib/atig/command/spam.rb', line 11
def action(target, mesg, command, args)
if args.empty?
yield "/me #{command} <SCREEN_NAME1> <SCREEN_NAME2> ..."
return
else
args.each do|screen_name|
api.delay(0) do|t|
res = t.post("report_spam",:screen_name => screen_name)
yield "Report #{res.screen_name} as SPAMMER"
end
end
end
end
|
#command_name ⇒ Object
9
|
# File 'lib/atig/command/spam.rb', line 9
def command_name; %w(spam SPAM) end
|