Moved cheese-related commands to a new folder. Added intro for when joining a new server.

This commit is contained in:
2026-01-12 14:10:34 -03:00
parent 9efcc1c98d
commit ae2a29f374
6 changed files with 98 additions and 3 deletions

View File

@@ -14,7 +14,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
require_relative '../lists/cheese_facts'
require_relative '../../lists/cheese_facts.rb'
module Commands
module Facts

View File

@@ -14,7 +14,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
require_relative '../lists/cheese_photos'
require_relative '../../lists/cheese_photos'
module Commands
module Photos

View File

@@ -14,7 +14,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
require_relative '../lists/cheese_of_truth'
require_relative '../../lists/cheese_of_truth'
module Commands
module Truth

View File

@@ -0,0 +1,58 @@
# cheeseBot
# Copyright (C) 2026 Eri (csxkdv/nxkdv) nxkdv@thenight.club
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
require 'securerandom'
module Commands
module Help
extend self
def register(bot)
cmd_key = :help
cmd_desc = "Use this command to know more."
bot.register_application_command(cmd_key, cmd_desc, server_id: ENV['SERVER_ID'])
bot.application_command(cmd_key) do |event|
random_color = ("0x" + Random.bytes(3).unpack1('H*')).to_i(16)
author = event.user
embed_generated = {
title: "About cheeseBot...",
description: "Here's everything you need to know!",
color: random_color,
timestamp: Time.now.iso8601,
author: {
name: author.username,
icon_url: author.avatar_url
},
fields: [
{
name: "Who am I?",
value: "I'm cheeseBot. Made by <@396376536070094848> related to cheese stuff."
},
{
name: "What are your commands?",
value: "/cheese, /fact, /photo, /truth, and more!"
}
]
}
event.respond(embeds: [embed_generated])
end
end
end
end