Remove unused files. Fix compiler warnings. Update help
This commit is contained in:
parent
f5acab7440
commit
a05d6f77db
2
.idea/dataSources.local.xml
generated
2
.idea/dataSources.local.xml
generated
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="dataSourceStorageLocal" created-in="CL-222.3345.126">
|
||||
<component name="dataSourceStorageLocal" created-in="CL-213.7172.20">
|
||||
<data-source name="MySQL for 5.1 - soundfx@localhost" uuid="1067c1d0-1386-4a39-b3f5-6d48d6f279eb">
|
||||
<database-info product="" version="" jdbc-version="" driver-name="" driver-version="" dbms="MYSQL" exact-version="0" />
|
||||
<secret-storage>master_key</secret-storage>
|
||||
|
3
Cargo.lock
generated
3
Cargo.lock
generated
@ -1924,10 +1924,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "soundfx-rs"
|
||||
version = "1.5.1"
|
||||
version = "1.5.2"
|
||||
dependencies = [
|
||||
"dashmap",
|
||||
"dotenv",
|
||||
"env_logger",
|
||||
"lazy_static",
|
||||
"log",
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "soundfx-rs"
|
||||
version = "1.5.1"
|
||||
version = "1.5.2"
|
||||
authors = ["jellywx <judesouthworth@pm.me>"]
|
||||
edition = "2018"
|
||||
|
||||
@ -8,7 +8,6 @@ edition = "2018"
|
||||
songbird = { version = "0.3", features = ["builtin-queue"] }
|
||||
poise = "0.2"
|
||||
sqlx = { version = "0.5", default-features = false, features = ["runtime-tokio-rustls", "macros", "mysql", "bigdecimal"] }
|
||||
dotenv = "0.15"
|
||||
tokio = { version = "1", features = ["fs", "process", "io-util"] }
|
||||
lazy_static = "1.4"
|
||||
reqwest = "0.11"
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,7 +0,0 @@
|
||||
{
|
||||
"heavy rain": "243627__lebaston100__heavy-rain.wav",
|
||||
"rain on window": "rain-on-windows-cropped.wav",
|
||||
"rain on tent": "531947__straget__the-rain-falls-against-the-parasol.wav",
|
||||
"waves": "400632__inspectorj__ambience-seaside-waves-close-a.wav",
|
||||
"river": "459407__pfannkuchn__small-river-1-fast-close.wav"
|
||||
}
|
Binary file not shown.
@ -21,6 +21,7 @@ pub async fn help(ctx: Context<'_>) -> Result<(), Error> {
|
||||
|
||||
__Play Commands__
|
||||
`/play` - Play a sound by name or ID
|
||||
`/queue` - Play sounds on queue instead of instantly
|
||||
`/loop` - Play a sound on loop
|
||||
`/disconnect` - Disconnect the bot
|
||||
`/stop` - Stop playback
|
||||
@ -38,7 +39,8 @@ __Search Commands__
|
||||
`/random` - View random public sounds
|
||||
|
||||
__Setting Commands__
|
||||
`/greet set/unset` - Set or unset a join sound
|
||||
`/greet server set/unset` - Set or unset a join sound for just this server
|
||||
`/greet user set/unset` - Set or unset a join sound across all servers
|
||||
`/greet enable/disable` - Enable or disable join sounds on this server
|
||||
`/volume` - Change the volume
|
||||
|
||||
|
@ -81,7 +81,7 @@ pub async fn set_guild_greet_sound(
|
||||
Some(sound) => {
|
||||
ctx.data()
|
||||
.update_join_sound(user.id, ctx.guild_id(), Some(sound.id))
|
||||
.await;
|
||||
.await?;
|
||||
|
||||
ctx.say(format!(
|
||||
"Greet sound has been set to {} (ID {})",
|
||||
@ -123,7 +123,7 @@ pub async fn unset_guild_greet_sound(
|
||||
|
||||
ctx.data()
|
||||
.update_join_sound(user.id, ctx.guild_id(), None)
|
||||
.await;
|
||||
.await?;
|
||||
|
||||
ctx.say("Greet sound has been unset").await?;
|
||||
|
||||
@ -153,7 +153,7 @@ pub async fn set_user_greet_sound(
|
||||
Some(sound) => {
|
||||
ctx.data()
|
||||
.update_join_sound(ctx.author().id, None::<GuildId>, Some(sound.id))
|
||||
.await;
|
||||
.await?;
|
||||
|
||||
ctx.send(|b| {
|
||||
b.ephemeral(true).content(format!(
|
||||
@ -181,7 +181,7 @@ pub async fn set_user_greet_sound(
|
||||
pub async fn unset_user_greet_sound(ctx: Context<'_>) -> Result<(), Error> {
|
||||
ctx.data()
|
||||
.update_join_sound(ctx.author().id, None::<GuildId>, None)
|
||||
.await;
|
||||
.await?;
|
||||
|
||||
ctx.send(|b| b.ephemeral(true).content("Greet sound has been unset"))
|
||||
.await?;
|
||||
|
@ -11,7 +11,6 @@ mod utils;
|
||||
use std::{env, sync::Arc};
|
||||
|
||||
use dashmap::DashMap;
|
||||
use dotenv::dotenv;
|
||||
use poise::serenity::{
|
||||
builder::CreateApplicationCommands,
|
||||
model::{
|
||||
@ -72,8 +71,6 @@ pub async fn register_application_commands(
|
||||
async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
|
||||
env_logger::init();
|
||||
|
||||
dotenv()?;
|
||||
|
||||
let discord_token = env::var("DISCORD_TOKEN").expect("Missing DISCORD_TOKEN from environment");
|
||||
|
||||
let options = poise::FrameworkOptions {
|
||||
@ -138,9 +135,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
|
||||
register_application_commands(
|
||||
ctx,
|
||||
framework,
|
||||
env::var("DEBUG_GUILD")
|
||||
.map(|inner| GuildId(inner.parse().expect("DEBUG_GUILD not valid")))
|
||||
.ok(),
|
||||
None,
|
||||
)
|
||||
.await
|
||||
.unwrap();
|
||||
|
Loading…
Reference in New Issue
Block a user