Skip to content

Instantly share code, notes, and snippets.

View PhantomKnight287's full-sized avatar
:shipit:
In Love With Terminal

Gurpal Singh PhantomKnight287

:shipit:
In Love With Terminal
View GitHub Profile
/// Get Balance of your account or another user
#[poise::command(slash_command, prefix_command)]
pub async fn balance(
ctx: Context<'_>,
#[description = "Selected user"] user: Option<User>,
) -> Result<(), Error> {
let u = user.as_ref().unwrap_or_else(|| ctx.author());
ctx.defer().await.expect("Cannot defer");
let client = ctx.data();
let id = u.id.0.clone().to_string();
with open("school.txt") as f:
data = f.read()
lines = data.split("\n")
total_words = len(data.replace("\n",""))
total_lines = len(lines)
vowels = 0
consonants = 0
// async createSticker({
// description, filePath, name, tags, fileName
// }: {
// /**
// * The Name of the Sticker
// */
// name: string,
// /**
// * The Description of the Sticker
// */
import { Collection } from "../../deps.ts";
import { BaseRestApiUrl } from "../constants/mod.ts";
import { HttpError } from "../handler/errors/http.ts";
export class RestClient extends Collection<string, Record<any, any>> {
constructor() {
super();
}
async request(
href: string,