-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix Source Command Repo Link and fix typo (#17) * Fixed repo link * Fixed typo * Fix production error handler (#19) * Add twitch integration only in production (#21) * Removed docsdex submodule (#22) * Fix Error handler for slash commands (#23) * Fix production error handler * Make @NyCodeGHG happy * Fix detekt issues * Replace work around in favour of Kord release * Respond with Embed on unkown tag (#25) * Removed docsdex submodule * Fix embed * Remove unused method * Variables in Tags (#26) * Added calculation parser * Added check task to ci * Added calc command * Added pow functionality * Fixed formatting * Added tag variables * Added http variable * Add tag with variable creation only by bot owners * Added floating number support * Fixed calc command * Fixed exception handling * Fix formatting * Adds DCommand (#37) * Adds DCommand * Resolves problems * Fix when docs missing (#39) * Fix missing docs * Fix formatting Co-authored-by: Michael Rittmeister <michael@rittmeister.in> Co-authored-by: warrior_zz <63170816+warriorzz@users.noreply.github.com>
- Loading branch information
1 parent
64e6507
commit 4f314c7
Showing
5 changed files
with
106 additions
and
11 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
52 changes: 52 additions & 0 deletions
52
src/main/kotlin/de/nycode/bankobot/commands/general/DCommand.kt
This file contains 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,52 @@ | ||
/* | ||
* MIT License | ||
* | ||
* Copyright (c) 2021 BankoBot Contributors | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in all | ||
* copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
* SOFTWARE. | ||
* | ||
*/ | ||
|
||
package de.nycode.bankobot.commands.general | ||
|
||
import de.nycode.bankobot.command.command | ||
import de.nycode.bankobot.command.description | ||
import de.nycode.bankobot.commands.GeneralModule | ||
import dev.kord.core.behavior.channel.MessageChannelBehavior | ||
import dev.kord.core.behavior.channel.createEmbed | ||
import dev.kord.x.commands.annotation.AutoWired | ||
import dev.kord.x.commands.annotation.ModuleName | ||
import dev.kord.x.commands.model.command.invoke | ||
|
||
@ModuleName(GeneralModule) | ||
@AutoWired | ||
fun dCommand() = command("dddd") { | ||
alias("d", "dd", "ddd") | ||
description("They don't know :pepeLaugh:") | ||
|
||
invoke { | ||
channel.specificCommand() | ||
} | ||
} | ||
|
||
private suspend fun MessageChannelBehavior.specificCommand() { | ||
createEmbed { | ||
title = "Imagine using xd in 2k21... oh wait" | ||
} | ||
} |
This file contains 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
This file contains 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