Questions tagged [replit]

Replit (formerly Repl.it) is an online IDE (integrated development environment) supporting over 50 programming languages. Use this tag for questions regarding using the IDE.

replit (formerly Repl.it) is an online integrated development environment (IDE) that supports over fifty programming languages including Python, Node.js, Java, C++ and Kotlin (to name a few). It contains an editor for writing your code. It can then build your code (if required) and execute it. All online in your Web browser.

361 questions
-2
votes
1 answer

Getting two different outputs in two different apps?

When I run the code in replit I get the following output 1024, 512,0,0,0 but when I run it in VS Code I get 2,2,0,0,0. Is there something wrong with my VS Code C++ configuration. #include #include using namespace std; int…
Pygatti
  • 1
  • 1
-3
votes
2 answers

Error in calculator program using python. NameError

i get the error traceback (most recent call last): File "main.py", line 64, in print(f" {num_1} {operation} {num_2} = {answer}") NameError: name 'answer' is not defined idk why, tho. this code was working very well, so i didnt touch it. but as sson…
-3
votes
1 answer

I had programmed a Discord Bot command in Replit but the command is not showing in Discord Server

import discord from discord.ext import commands intents = discord.Intents.default() intents.messages = True intents.message_content = True bot = commands.Bot(command_prefix='!', intents=intents) roles_to_monitor = [ROLE_ID] monitored_channels =…
-3
votes
2 answers

Why is the script not updating the contents of the element?

I have done this before in other environments and it worked so I suspect it's an environment problem. See link: https://replit.com/@MargaretGuzman/Demo#script.js I expected the script to update the contents of the element to "hi". const box =…
-3
votes
1 answer

What is the 'requirements.txt' file? What should be in it in this particular case?

I am switching from Replit to PebbleHost to host my Python bot. What do I put in my requirements.txt file? These are the imports that I have at the start of my bot. import asyncio import datetime import functools import io import json import…
choppa
  • 11
  • 2
-3
votes
3 answers

How to convert a txt file into a dictionary and manage user logins in Python?

I am working on a beginner project where I need to build a login system for one admin and multiple employees. The functionalities include: Employees can view their salary. The admin can change employee salaries. The data for employees is stored in a…
Ezio
  • 19
  • 5
-3
votes
1 answer

Javascript Code not showing desired output if run through vs code

I have tried many times it is not showing the desired output if i run it through vs code but this code works well and produces desired output if i run it in replit online code editor Someone Please help! let age = prompt("enter your age") age =…
-3
votes
1 answer

;[discord.js] How to check author id of a message id equal bot id or not

This is my code const botID = '986945043849945088' let msgID = await message.channel.messages.fetch(args[0]).catch(() => undefined); if (msgID.includes(botID)) return message.reply(`This message does not belong to <@${client.user.id}>`) …
Julian-V
  • 13
  • 1
  • 6
-5
votes
0 answers

AttributeError 'command' object has no attribute 'utils'

I am trying to run my code but it keeps returning this error, which came out of no where. I’m using repl.it I litterly tried nothing it just happened when I was restarting my bot, I’ve removed a lot of stuff from my code returning these errors
-5
votes
1 answer

How do you make a bot add a custom emoji reaction to its own message?

As far as I know, get_all_emojis has been deprecated and I've been struggling to find a replacement. How do I make a bot add reactions to its own messages with a custom emoji? What I'm really struggling with is getting the "emoji" variable in the…
Yozy Opto
  • 23
  • 5
-5
votes
1 answer

Why does this code give the wrong answer in C?

I have written the following code. Any combination of numbers less than 50000 and 60000 gives the correct answer, but for some reason I always get -1294967296 when I use 50000 and 60000. Can anyone tell me why this is? #include int main()…
Ben
  • 3
1 2 3
23
24