Skip to content
Sign upLog in
Profile icon

Almost Static

@almostStatic
Passionate computer science student and good friends with @RossJames
Repls
Community
almostStatic
almostStatic
published a Repl
1 year ago
0
omgthisprogrammeisactuallysolong
omgthisprogrammeisactuallysolongOur legendary computer science teacher gave us a task to shorten code. Originally, somebody got it from 71 or so lines down to 20, then somebody else to 15, and so on till somebody got 4 lines. I went home and spent about 30 minutes on it and got it in 2 lines. Boom. Also got one with only one line but I don't know if I want to count that since it was in another file. I doubt anyone will get anything lower than 2 lines - primarily because of the for .. in function requiring a newline; you must use a for .. in loop in order to loop through every element, as Python does not come with any built-in functions that allow this. In JavaScript, I can easily rewrite this in one line due to it being a better language (and that you can use semicolons to manage and terminate statements that therefore allow you to write your entire programme on one line, albeit not advised)
#python
#python3
almostStatic
almostStatic
shared a Post
2 years ago
1
This is something I made out of my spare time, I was going to use it for one of my Discord bots and felt that sharing this might help others, too. He
Hyphen
Node.js
almostStatic
almostStatic
shared a Post
2 years ago
1
Testing to see if a str is a valid hex colour code There are many ways this can be applied, for instance, in my discord bot I have a >setcolor comma
HexColourCodeRegExp
Node.js
almostStatic
almostStatic
shared a Post
2 years ago
1
Trim a string The below function will return a string that isn't longer than the specified maxLength. If a string is longer than maxLength then the l
TrimStr-notLinkedToGitHub
Node.js
almostStatic
almostStatic
shared a Post
2 years ago
4
Using the Discord.JS Docs API (v1) You need to send a GET request to the following URL: https://djsdocs.sorta.moe/v1/main/stable/embed?q={query} re
DJS-DocsAPI-v1
Node.js
almostStatic
almostStatic
shared a Post
2 years ago
3
Welcome I've seen this issue pop up everywhere, even in the Official Discord.js Server I'm sure many of you have received the error cannot read prop
Codemonkey51
Codemonkey51
Cool!2 years ago
almostStatic
almostStatic
shared a Post
2 years ago
11
Discord Permissions List (In Array Form) Ever making a command in your discord.js bot and realise that you suddenly need an array containing all of t
PixelNinja
PixelNinja
Ty, I will favorite this post so I can easily get to it.2 years ago
almostStatic
almostStatic
shared a Post
2 years ago
20
Hello People > This template and its use has been deprecated. > > If you are looking for a guide on making a Discord bot using discord.js, I recommen
Node.js Discord Bot Template
Node.js
interpixle
interpixle
how to get my bot token4 months ago
VanillaistOfficial
VanillaistOfficial
Why does the bot say whatever you say and how to remove it?11 months ago
7Hubs
7Hubs
/home/runner/Removed/node_modules/discord.js/src/rest/RESTManager.js:32 const token = this.client.token ?? this.client.accessToken; ^ SyntaxError: Unexpected token '?' Could someone please help?1 year ago
almostStatic
almostStatic
shared a Post
3 years ago
14
Editing Messages | Discord.js If you do not have a solid understanding of JavaScript or how it works and wish to learn how to do this; I suggest that
JUMBA
JUMBA
is it possible to make it so the bot sends the message after a command, like you showed, but instead of it instantley editing it, it does so after another command? for example i say a, the bot responds b, then i say c, and he edits the "b" to be a "d". Kinda confusing, but i hope you understand.2 years ago
RhyleyPlant
RhyleyPlant
do you know if there is a way to edit a message after a user has sent a message?2 years ago
almostStatic
almostStatic
shared a Post
3 years ago
11
Hey there! Today I will be teaching you how to 'wait for messages' in discord.js. Also known as awaitMessages. This tutorial is written in Nodejs and
awaitMessages Discord.js
Node.js
DavidBerg4
DavidBerg4
@almostStatic I'm trying to create multiple inputs, and I'm struggling with it. Is it possible to message me?2 years ago
shortname01
shortname01
aaaaaaAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAH3 years ago