Main commit
This commit is contained in:
14
src/commands/echo.rb
Normal file
14
src/commands/echo.rb
Normal file
@@ -0,0 +1,14 @@
|
||||
module Commands
|
||||
module Echo
|
||||
extend self
|
||||
def register(bot, _db)
|
||||
bot.register_application_command(:echo, 'Repeats what you say', server_id: ENV['TEST_SERVER_ID']) do |cmd|
|
||||
cmd.string('message', 'The text you want the bot to repeat', required: true)
|
||||
end
|
||||
|
||||
bot.application_command(:echo) do |event|
|
||||
event.respond(content: "You said: #{event.options['message']}")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user