-
Notifications
You must be signed in to change notification settings - Fork 6
Add info command with some responses #64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
katefort
wants to merge
16
commits into
veganhacktivists:main
Choose a base branch
from
katefort:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 12 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
a6c6179
add info command with some responses
katefort 15aee11
format the code
katefort ba947cc
format the code again
katefort fbd951f
format the code again
katefort 5c46245
format the code again
katefort a7c305d
format the code again (thanks anthony)
katefort 3a72fdd
format the code again (thanks anthony)
katefort 2be46aa
add my name to copyright
katefort 591b3fd
add a newline at end of file (are you kidding)
katefort 2270f06
help
katefort ff0a049
fix
katefort 98eb4c0
fix
katefort 2e181a8
fix
katefort aec4367
fix info command to compile properly
katefort d890c81
rename variable
katefort 6be66fb
Merge branch 'veganhacktivists:main' into main
katefort File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,79 @@ | ||
| // SPDX-License-Identifier: GPL-3.0-or-later | ||
| /* | ||
| Animal Rights Advocates Discord Bot | ||
| Copyright (C) 2022 Anthony Berg, Kate Fort | ||
|
|
||
| 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/>. | ||
| */ | ||
|
|
||
| import { Command } from '@sapphire/framework'; | ||
|
|
||
| class InfoCommand extends Command { | ||
| argMap: Map<string, string>; | ||
|
|
||
| public constructor(context: Command.Context, options: Command.Options) { | ||
| super(context, { | ||
| ...options, | ||
| name: 'info', | ||
| description: 'Gets info on common anti-vegan arguments', | ||
| }); | ||
| } | ||
|
||
|
|
||
| // Registers that this is a slash command | ||
| public override registerApplicationCommands(registry: Command.Registry) { | ||
| registry.registerChatInputCommand((builder) => builder | ||
| .setName(this.name) | ||
| .setDescription(this.description)) | ||
| .addStringOption((option) => option.setName('argument') | ||
| .setDescription('The argument you want to learn about') | ||
| .setRequired(true)); | ||
katefort marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| } | ||
|
|
||
| // Command run | ||
| public async getInfo(interaction: Command.ChatInputInteraction) { | ||
|
||
| const argument = interaction.options.getString('argument'); | ||
katefort marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| this.argMap = new Map<string, string>([ | ||
katefort marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ['natural', 'Murder and rape are both natural. Does that mean they are okay?'], | ||
| ['but I can', 'You could also probably kill a baby if you wanted to. Does that make it right?'], | ||
| ['resources', 'Here are some resources compiled in a spreadsheet form! https://vegancheatsheet.org'], | ||
| ['personal choice', 'Is it okay for a killer to kill someone because it was his personal choice?'], | ||
| ['I love animals', 'Would you also say, “I love my children and I also beat them”?'], | ||
| ['meat tastes good', 'Is it morally acceptable for someone to kill a dog if that person likes the taste? \n As a vegan you can still experience all the tastes and consistencies you were used to, with the only difference that they are made of plants.'], | ||
| ['animals eat meat', 'Wild animals also kill each other. Does that mean it’s morally acceptable for people to kill each other?'], | ||
| ['tradition', 'Slavery, racial segregation and the oppression of women were once regarded as a tradition and part of culture. Is that why we should stick to these practices?'], | ||
| ['culture', 'Slavery, racial segregation and the oppression of women were once regarded as a tradition and part of culture. Is that why we should stick to these practices?'], | ||
| ['our ancestors ate meat', 'Eating animals has helped our ancestors to survive. But do we still need to resort to eating meat to survive today?'], | ||
| ['cows will overpopulate the world', 'The world will not become completely vegan overnight, but this will instead be a gradual process over a long period of time.'], | ||
| ['humans are more important', "We don't need to choose between killing people and animals. Veganism is a way to avoid animal suffering while also improving the lives of humans and your own health."], | ||
| ['plants feel pain', "It takes up to 16 kg of plants to produce 1 kg of meat. Additionally, we don't know that for a fact, where we can hear the screams of animals being slaughtered."], | ||
| ["it's the food chain", 'The food chain exists because of what animals need to do to survive. Do you need to eat animals to survive?\nAdditionally, every cruelty committed by man is based on the illusion of self-assigned power; be it Nazis who believed they were superior to Jews, white people who believed they were superior to black people, or people who believe they are superior to animals.'], | ||
|
|
||
| ]); | ||
|
|
||
| if (argument.length === 0 || !argMap.has(argument)) { | ||
| await interaction.reply({ | ||
| content: 'Please enter a listed argument!', | ||
| ephemeral: true, | ||
| fetchReply: true, | ||
| }); | ||
| } else { | ||
| await interaction.reply({ | ||
| content: `${argMap.get(argument)}`, | ||
| ephemeral: false, | ||
| fetchReply: true, | ||
| }); | ||
| } | ||
| } | ||
| } | ||
| export default InfoCommand; | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.