Add ohagi command in tootctl

This commit is contained in:
KMY 2023-09-13 11:03:56 +09:00
parent f0d39bba53
commit 7211dbb240
2 changed files with 37 additions and 0 deletions

View file

@ -12,6 +12,7 @@ require_relative 'feeds'
require_relative 'ip_blocks'
require_relative 'maintenance'
require_relative 'media'
require_relative 'ohagi'
require_relative 'preview_cards'
require_relative 'search'
require_relative 'settings'
@ -65,6 +66,9 @@ module Mastodon::CLI
desc 'maintenance SUBCOMMAND ...ARGS', 'Various maintenance utilities'
subcommand 'maintenance', Maintenance
desc 'ohagi SUBCOMMAND ...ARGS', 'Ohagis'
subcommand 'ohagi', Ohagi
option :dry_run, type: :boolean
desc 'self-destruct', 'Erase the server from the federation'
long_desc <<~LONG_DESC

33
lib/mastodon/cli/ohagi.rb Normal file
View file

@ -0,0 +1,33 @@
# frozen_string_literal: true
require 'concurrent'
require_relative 'base'
module Mastodon::CLI
class Ohagi < Base
desc 'good', 'Ohagi is good'
def good
say('Thanks!', :green)
end
desc 'bad', 'Ohagi is bad'
def bad
say('Sorry...', :red)
end
desc 'tsubuan', 'Ohagi is tsubuan'
def tsubuan
say('Thanks! You are knight in shining armor!', :green)
end
desc 'koshian', 'Ohagi is koshian'
def koshian
say('Let the WAR begin.', :red)
end
desc 'kokuraan', 'Ohagi is kokuraan'
def kokuraan
say('I hate you.', :yellow)
end
end
end