Questions tagged [repl.it]

Questions related to the popular online development environment repl.it. Questions should be related to the use and functionality of the repl.it editor/console itself rather than questions about programs developed on repl.it.

Website link: https://repl.it.

318 questions
0
votes
0 answers

I can't get my discord bot to send a link

This is the code that I used: @client.command(pass_context = True) async def music(ctx, *args): global mesg mesg = 'https://cdn.discordapp.com/attachments/759465899844567157/797828093494558740/videoplayback.mp4'.join(args) return await…
0
votes
1 answer

Existing Repl.it Express Mongoose app now refusing to connect to MongoDB Atlas

I have an Express Mongoose app that used to connect to MongoDB Atlas without any problem whatsoever. It is hosted on Repl.it But when I checked today, it is not working. MongooseError: The `uri` parameter to `openUri()` must be a string, got…
vinod-vms
  • 25
  • 6
0
votes
1 answer

How to change only one value of a list from repl.it database?

I'm trying to code a Discord game bot on repl.it and I use its database to store the players' data. So I'm now making a command to let players rename themselves but then there is a problem. The following lines work but involve affecting a new value…
Larwive
  • 87
  • 2
  • 9
0
votes
1 answer

Why am I getting different outputs for the same code?

#include typedef struct { int x,y; } point; point* create_point(int x,int y) { point p={x,y}; point* ptr = &p; return ptr; } int main() { point* p1 = create_point(1,2); point* p2 = create_point(6,7); printf("%d, %d, ",…
0
votes
1 answer

How do I stop MongoDatabase connection logging?

I have a node js web server, and hen ever I wake up the server, after MongoDatabase connects, it sends this to my console MongoClient { _events: [Object: null prototype] { newListener: [Function] }, _eventsCount: 1, _maxListeners: undefined, …
user13616016
0
votes
1 answer

Can anyone help me with I/O redirection of C/C++ Program to a File without using filestreams on Repl.it

I'm trying to do I/O redirection in the open shell on repl.it. Taking the input from one file to run through the program. Outputting to a new file but nothing shows up? I'm only used to doing it from Windows using the CMD. Shell: ~/maybe-lab6and7$…
0
votes
1 answer

Why is my program saying that 5 * 5 is equal to 104126025?

I created a function to return the result of all the odd numbers in a vector. int oddProduct(std::vector arr) { int sum = 1; for (int i = 0; i <= arr.size(); i++) { if (arr[i] % 2 != 0){ sum *= arr[i]; …
0
votes
1 answer

How to fix: roles is not defined (Discord.js)

I'm trying to add a role to a member when they join my server, here is the code I have: The problem I'm getting is "ReferenceError: roles is not defined" can someone please help me solve this? client.on("guildMemberAdd", (member) => { …
Cld Djd
  • 3
  • 4
0
votes
1 answer

Repl.it Login Unauthorized

Hi, I'm trying to access repl.it from mobile But when I try to login from google it is giving me unauthorized error It works fine in pc, any fix?
0
votes
1 answer

Is there a way I can get this code to update a discord channel reliably every minute?

I found this code on GitHub and am trying to get it to update a voice channel on Discord every minute with the current time. Unfortunately, this code only seems to work every 10 minutes, and then updates the minute after, no matter how many times I…
Nosh118
  • 21
  • 2
0
votes
1 answer

SyntaxError: Unexpected token =

class Match { JSDOM = jsdom; Discord = require("discord.js"); jsdom = require("jsdom"); … } This is the code I use, and I get the error: JSDOM = jsdom(); ^ SyntaxError: Unexpected token = Why? This should work right? This only…
delta-alph
  • 21
  • 2
  • 6
0
votes
1 answer

I can't figure out how to find the two imaginary numbers

So, I wrote a Java program that finds the solutions to a quadratic equation and my problem is I can't seem to write the right code to find the "imaginary numbers" when it prints out I just get "NaN". Any solutions? import java.util.Scanner; class…
thomas
  • 19
  • 1
0
votes
1 answer

Ordering a json jable as its being outputted

So I am trying to create a table system that can show the users the current tables, scores, games, fixtures etc and thought it might be easier to determine the order as they get put into the json file but not actually order them until they have to…
user13524876
0
votes
1 answer

How do i stop my array from resetting (Discord.js)

I'm making a Discord.js bot and I have an array (it's declared outside of client.on('message',msg =>{... or anything else like that. When I use bot commands to input some user IDs into the array print the array, it prints and works fine. However,…
RtHAitP30D
  • 306
  • 3
  • 6
  • 19
0
votes
3 answers

Requesting the same input if user enters an invalid option

public static void main(String[] args) { int i = 0; while (i==0) { //game restarts if i=0 PlayGame(); // Resets back to the start after the game is finished. System.out.print("Would you like to start again? (y/n) "); String sAns =…
Jayme2
  • 19
  • 1