
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
io.github.jan-tennert.discordkm:DiscordKM-jvm
Advanced tools
A Kotlin Multiplatform Discord API Wrapper
A Kotlin Multiplatform Discord API Wrapper
Packages:
Discord: Click here
Wiki: Click here
You can create a client easily by just using buildClient:
val client = buildClient("TOKEN") {
intents = mutableSetOf( //set intents
Intent.GUILD_MEMBERS,
Intent.GUILD_PRESENCES,
Intent.GUILD_WEBHOOKS,
Intent.GUILD_MESSAGE_TYPING,
Intent.DIRECT_MESSAGE_TYPING,
Intent.GUILDS
)
logging {
level = Logger.Level.WARN
}
reconnectDelay = 10.seconds
enabledCache -= CacheFlag.VOICE_STATES //remove caches you don't need
}
client.on<MessageCreateEvent> {
println("Received message: ${message.content}")
}
//slash commands:
client.on<ReadyEvent> {
client.commands.createChatInputCommand {
name = "test"
description = "This is a chat input command!"
options {
string(name = "option1", description = "This is a string option", required = true) {
choice("choice1", "choice1")
}
user("option2", "This is a user option", required = true)
}
}
}
client.on<SlashCommandEvent>(predicate = { it.commandName == "test" }) {
interaction.reply("String Option: ${options["option1"].string}. User Name: ${options["option2"].user.name}")
}
client.login()
If you want to easily add event listeners without having to use the Kotlin DSL you can use the following:
client.importCommands("io.github.jan.bot.commands", subPackages = true, mapOf(
"someValue" to 1.0
) /* Map for argument injection */)
//then you can add top level functions in the commands package and in all its subpackages
@CommandExecutor(name = "test", subCommand = "subCommand") //You can optionally use subCommand and subCommandGroup
fun SlashCommandEvent.testCommand(@Inject("someValue") value: Double) {
interaction.reply("injected value: $value")
}
//same with events:
client.importEvents("io.github.jan.bot.events", subPackages = true, mapOf(
"node" to lavalinkNode
))
@EventListener
fun MessageCreateEvent.play(@Inject("node") lavalinkNode: LavalinkNode) {
//play music
}
FAQs
A Kotlin Multiplatform Discord API Wrapper
We found that io.github.jan-tennert.discordkm:DiscordKM-jvm demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.