This file contains hidden or 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
| /// 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(); |
This file contains hidden or 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
| 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 |
This file contains hidden or 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
| // async createSticker({ | |
| // description, filePath, name, tags, fileName | |
| // }: { | |
| // /** | |
| // * The Name of the Sticker | |
| // */ | |
| // name: string, | |
| // /** | |
| // * The Description of the Sticker | |
| // */ |
This file contains hidden or 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
| 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, |
NewerOlder