Share your repls and programming experiences

← Back to all posts
Cytotron - Take your discord server to the next level
h
LeviathanCoding

Cytotron is a powerful discord bot that will make your discord server way more active and way more fun. With built-in role handouts, googling, sha-256 encrypting, and more, you are sure to enjoy the bot.

This is my first discord bot. Thanks to the help of google and stackoverflow for helping me with this.

What are you waiting for? Go to the website and add the bot to your server!
https://cytotron-bot.gq/

If you have any feedback on the bot, please message me in discord at LeviathanProgramming#2139 or contact me by email (on the website).

I will most likely stop answering comments on this repl after a while.

This is for the repl Jam on discord bots. I'm hoping to win $1000 in bitcoin!

Voters
Ultramate
ChopSueyMaster
HypnosBot
AutomationKing
Nicksalve
imnew12
Alexify
LegendaryWolf
JamesDaCoolDude
sklyeriscool
Comments
hotnewtop
Writerfrighter

Ah so all we need to bring @LeviathanCoding back is 1000$ cash rewards ok

LeviathanCoding

@Writerfrighter , Lol unfortunately no

Writerfrighter
firefish
P0GCHAMPB0i

cool :)

P0GCHAMPB0i

cool

P0GCHAMPB0i

cool

firefish

@P0GCHAMPB0i don't spam

crackerberries
firefish

@crackerberries qazn't ŋ'no

P0GCHAMPB0i

cool

JacobMcPherson1

I don't know much about discord bots, but this is still cool!

rohithsam

cool discord bot, but if ur 15 how have you already graduated from high school? @LeviathanCoding

LeviathanCoding

I was homeschooled, @rohithsam ,so I could do school really fast.

STCollier

@LeviathanCoding me too, and I really enjoy it.

rohithsam

@LeviathanCoding so does that mean that ur in college rn or ur going to college next year? lmao still confused tho

P0GCHAMPB0i

?!??!!??!?!?!??!??!??!?!?!??!?!?!?!?!??!?!????

firefish

Ah yes, my favourite top-level domain: .gq.

BabyBoy666

@firefish I heard google is moving to it I see it now "google.gq"

LeviathanCoding

@ElliotMassey , that can't be true.

BabyBoy666

@LeviathanCoding just you wait
"repl.gq"
"discord.gq"
"youtube.gq"
the gq Apocalypse is coming

firefish

@LeviathanCoding yeah there's this thing called a joke

Whippingdot

Why not binging ;)

or ducking ;;)

chinnupavan48

can you tell me how to make this bot alive forever ? Thanks in advance..

LeviathanCoding

@chinnupavan48 , Hacker plan and/or website monitor.

ChopSueyMaster

seems great

codeninja135

what if someone makes an AD bot that collects ad revenue from you lmao

christiant

You should try using Cogs instead of a single file, the bot will end up being bogged down after a while.

JakeHu2020

In orbitron-3 you said cytotron was gonna be a planet

LeviathanCoding

@JakeHu2020 , IK, but I decided to use it as a name for my bot :)

JakeHu2020
ArjunAnish

@LeviathanCoding is this bot hosted on repl 24/7? If it is than could you tell me how to do that as well?

LeviathanCoding

@ArjunAnish , I have the hacker plan. That's how.

PyCoder01

bitcoin is crashing. Not worth the bitcoin. Anyways nice.

WiiU

To anyone confused this is how you get it up and running.

  1. go to discord dev portal: https://discord.com/developers/applications
  2. press new application
  3. after you press on new application name it.
  4. now you should see a screen with tabs on the left, press bot.
  5. in bot tab click add bot.
  6. now you should be on the bots profile, under its username press copy token PS: DONT SHARE THE TOKEN WITH ANYONE.
  7. fork this repl.
    go to the secrets tab in the forked repl and create a new secret with the name of bot_token.
  8. now paste the token in to the value of the secret!.
  9. if you scroll down in the secrets tab you should see a way to add the secret to your code, press that.
  10. it should work now.
  11. wanna add it to your server?
    12 go to Oauth2 tab in the application page.
  12. copy the bots id.
    14 https://discordapp.com/oauth2/authorize?scope=bot&client_id=addurbotsidherelol
  13. once youve done that click on the drop down and select a server! you should be all done!

Or just press this https://discord.com/oauth2/authorize?client_id=848343750300139551&permissions=8&scope=bot :D

LeviathanCoding

@WiiU , that isn't the whole process. The user has to add the other env keys in!!

WiiU

@LeviathanCoding
Whoops! Forgot all about that, Will add. Are they nesscary though?

CodingCactus

This is for the repl Jam on discord bots

that was a few years ago :/

LeviathanCoding

@CodingCactus , wasn't there one just now?

CodingCactus

@LeviathanCoding no, the last jam was the game jam with theme "shoot" a few months ago celebrating the launch of kaboom.js

JBloves27

I think there was another one, the link should be here @CodingCactus

ThanhTails

great! But can you fix the error in the first?

FrancisPan


???

ThanhTails

@FrancisPan i got it too.

Orbtationz

@FrancisPan i got it aswell bro

LeviathanCoding

@FrancisPan , you have to input all the secret keys.

BabyBoy666

@FrancisPan youve got to the discord developer page and get a bot token

P0GCHAMPB0i

@LeviathanCoding what secret keys?

BabyBoy666

your bot token @P0GCHAMPB0i

[deleted]

Nice! BTW, you know the c in the center of the page? How do you make the lines make the outline of the c?

LeviathanCoding

@LeSensei , It's svg

P0GCHAMPB0i

@LeviathanCoding swag? or just svg?

tankerguy1917

I would totally use this in my discord servers, but my school has decided that Discord, and anything else someone might enjoy, are unacceptable and need to be blocked. The website looks good though, I like the color scheme.

LeviathanCoding

@tankerguy1917 , thanks.

BabyBoy666

@tankerguy1917 my school too, but i find a way ;)

tankerguy1917

@ElliotMassey lol. I could, but my loophole doesn't let me sign into any e-mail, so when discords freaks out about me logging in on a different computer I can't let discord know that its really me.

BabyBoy666
tankerguy1917

@ElliotMassey Yeah, but I can still go on reddit, so thats good I guess.

jihhyuu202

just use task manager and end the task thats blocking ur websites, then quickly reload the page before it comes back @tankerguy1917

tankerguy1917

@DylanZhaXcamop That sounds like a good idea, but I'm using a school monitored chromebook, so I don't have task manager, as far as I'm aware.

jihhyuu202

it says that shift + esc can open task manager on a [email protected]

tankerguy1917

@jihhyuu202 Thanks.

RayhanADev

Neat, but I see the biggest problem of all Python projects. Control Flow. So many if/else/if-else and try-expects. Maybe spilt it all into separated functions and wrap those in a try-except function? Also consider classes for the different operations?

Also the requests lib is synchronous, try using aiohttp and asyncio so it isn't blocking?

Lastly, do you need to change line 378? I'm not all too familiar with Discord API but that URL schema looks fixed so it won't work on forked instances...

LeviathanCoding

@RayhanADev , I stored the bot invite in the env file and also, I'll try using asyncio or aiohttp to get APIs instead.

firefish

@RayhanADev i love how every other language on earth has a try catch and python is just sitting there with try-except

PoolloverNathan
firefish

@PoolloverNathan well I don't know ruby

PoolloverNathan

@firefish begin-rescue-end

ModernSonicEXE

Umm. what happened. I'm pretty sure nothing but I guess its cool.

LeviathanCoding

@ModernSonicEXE , view the website. Link is in the readme.

ModernSonicEXE

@LeviathanCoding ok thank you mortal.

JWZ6

never mind gud job

FelixF809

doesnt work Traceback (most recent call last): File "main.py", line 647, in <module> client.run(os.getenv('bot_token')) File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/client.py", line 723, in run return future.result() File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/client.py", line 702, in runner await self.start(*args, **kwargs) File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/client.py", line 665, in start await self.login(*args, bot=bot) File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/client.py", line 511, in login await self.http.static_login(token.strip(), bot=bot) AttributeError: 'NoneType' object has no attribute 'strip' 

LeviathanCoding

@FelixF809 , that's because I guess when you forked it, the env file is destroyed

FelixF809

@LeviathanCoding i did not fork it

CosmicBear

@LeviathanCoding Maybe because the .env files only register for you so for us it doesn't exist

Dunce

@LeviathanCoding .env files are no longer supported, you have to use the "secrets" tab now.

LeviathanCoding

@Dunce , I know. That's what I use.

firefish

@LeviathanCoding .env files are no longer supported, you have to use the "secrets" tab now.

@Dunce same thing

Brendan23

@LeviathanCoding hmmm... the drawing is a little messed up:

LeviathanCoding

@Brendan23 , a little. I stuck it into an svg converter and that was the best I could get.

Brendan23
JWZ6

No working:

LeviathanCoding

@JWZ6 , It works. If you forked it, then it won't cuz the bot token is a secret.

JWZ6
XenoniCoder

Hello!
It's me!

LeviathanCoding

@XenoniCoder , sorry Idk who you are.

XenoniCoder

@LeviathanCoding
It's me Xenonic778 from Khan Academy.