added README.md

This commit is contained in:
2022-02-13 23:55:24 +05:30
parent b43472227a
commit 44aba55f5e
2 changed files with 20 additions and 4 deletions

10
README.md Normal file
View File

@@ -0,0 +1,10 @@
![Concourse CI](https://ci.weirdnatto.in/api/v1/teams/main/pipelines/singh3/badge) [![Docker](https://img.shields.io/docker/image-size/natto17/singh3.svg)](https://hub.docker.com/repository/docker/natto17/singh3)
# Singh3
My stupid discord bot that I will probably stop maintaining again like I did for the past 8+ months
Real shit code
- Not really a useful bot, run at your own risk
- You need postgresql too
- Environment Variables
- DISCORD_TOKEN={{.your-discord-token}}
- DB_URL={{.your-postgresql-db-url}}
- Image size is kinda large cuz it uses ubuntu for libraries that are dynamically needed

View File

@@ -71,8 +71,11 @@ pub async fn tadd(ctx: &Context, msg: &Message, args: Args) -> CommandResult {
let query: String = args.raw().collect::<Vec<&str>>().join(" ");
let queries = query.splitn(2, " ").collect::<Vec<&str>>();
if queries.len() != 2 && msg.attachments.len() == 0 {
msg.reply(ctx, "Please use the proper syntax: `,tadd <name> <value>` or attach something")
.await?;
msg.reply(
ctx,
"Please use the proper syntax: `,tadd <name> <value>` or attach something",
)
.await?;
return Ok(());
}
let data_read = ctx.data.read().await;
@@ -156,8 +159,11 @@ pub async fn tedit(ctx: &Context, msg: &Message, args: Args) -> CommandResult {
let query: String = args.raw().collect::<Vec<&str>>().join(" ");
let queries = query.splitn(2, " ").collect::<Vec<&str>>();
if queries.len() != 2 && msg.attachments.len() == 0 {
msg.reply(ctx, "Please use the proper syntax or attach something\n`,tedit <name> <value> `")
.await?;
msg.reply(
ctx,
"Please use the proper syntax or attach something\n`,tedit <name> <value> `",
)
.await?;
return Ok(());
}
let data_read = ctx.data.read().await;