How to set a Custom Changing Status with discord.py | Background Tasks

  Рет қаралды 47,681

Code With Swastik

Code With Swastik

3 жыл бұрын

In this video, we will learn how to set a Custom Changing Status for a Discord bot in python using discord.py (rewrite) in 2020.
If you have any suggestions for future videos, leave it in the comments below.
Some Useful Links -
Discord Developer Portal- / discord
My Discord Server- / discord
My Twitter - / codewithswastik
My Instagram - / code_with_swastik
Discord.py Documentation: discordpy.readthedocs.io/en/l...
Sublime Text: www.sublimetext.com/
Queries solved in the video:
1) How to set a Custom Changing Status with discord,py
2) How to make a Background Tasks in Discord.py
3) How to set status with discord.py
#discord #discordbot

Пікірлер: 100
@InfinityGamerYT
@InfinityGamerYT 3 жыл бұрын
I am first-time binge-watching programming videos, can't stop me after watching your videos
@anorak1263
@anorak1263 3 жыл бұрын
Just what i was looking for ! keep up the great work !!!!
@ianjia679
@ianjia679 3 жыл бұрын
You deserve more subscribers. Just subbed!
@CodeWithSwastik
@CodeWithSwastik 3 жыл бұрын
Thanks 😊
@Hiphop602y
@Hiphop602y 3 жыл бұрын
was waiting for this from so long!!
@CodeWithSwastik
@CodeWithSwastik 3 жыл бұрын
Glad I could help
@swaranabhadatta3115
@swaranabhadatta3115 3 жыл бұрын
@@CodeWithSwastik Please tell are u from west bengal
@CodeWithSwastik
@CodeWithSwastik 3 жыл бұрын
@@swaranabhadatta3115 no
@swaranabhadatta3115
@swaranabhadatta3115 3 жыл бұрын
@@CodeWithSwastik oooo ok ok
@Hiphop602y
@Hiphop602y 3 жыл бұрын
@@swaranabhadatta3115 Lol
@eliericksson.8950
@eliericksson.8950 3 жыл бұрын
Great job!!! Works really well!
@CodeWithSwastik
@CodeWithSwastik 3 жыл бұрын
Great to hear!
@cussy7526
@cussy7526 2 жыл бұрын
Why when I pass it to docker and run it it fails me? if I run it from the command line does not fail, but in docker if and uses the same versions in everything, I do not understand the reason for the failure, could you help me? thanks.
@andrey5056
@andrey5056 3 жыл бұрын
Thank you very much dude, just subbed from Brazil!!!
@CodeWithSwastik
@CodeWithSwastik 3 жыл бұрын
Thanks for the sub!
@verygood1013
@verygood1013 3 жыл бұрын
Nice tutorial dude, you earned a new sub.
@CodeWithSwastik
@CodeWithSwastik 3 жыл бұрын
Thanks for the sub!
@officialchickenn
@officialchickenn 3 жыл бұрын
Epic tutorial [new subscriber btw :D]
@CodeWithSwastik
@CodeWithSwastik 3 жыл бұрын
Thanks 😊
@hihey2324
@hihey2324 3 жыл бұрын
youre really helpful!!
@benblackburn03
@benblackburn03 3 жыл бұрын
Ayo your videos are amazing, you have really helped me out today, thankyou man :)
@CodeWithSwastik
@CodeWithSwastik 3 жыл бұрын
Happy to help!
@LofiNeo-yt
@LofiNeo-yt Жыл бұрын
i'm trying to get a status when the bot is Ready and another status when the bot is rebooting with presence ( idle , online , Dnd ) in it , someone has any idea ?
@clues8012
@clues8012 3 жыл бұрын
Can I do this with game and streaming? Like inter change
@zipzenn
@zipzenn 2 жыл бұрын
is there a way to make a command that changes the status depending on what they said?
@ironsamuraininja2881
@ironsamuraininja2881 3 жыл бұрын
Thank you I appreciate your help instant sub and like!!!!
@kohzi3533
@kohzi3533 2 жыл бұрын
is there a way to set your discord status so it says what song you're listening to at the moment?
@hydna1
@hydna1 2 жыл бұрын
Thank you so much, now whenever you look at my bot it says “watching your every move” lmao
@Abdullah_786-x3s
@Abdullah_786-x3s 3 жыл бұрын
@Code with Swastik it works but its not complete it doesnt listen or watch it just shows all my status playing!
@theodoraaugusta6454
@theodoraaugusta6454 3 жыл бұрын
does anyone else get a discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'Command' object has no attribute 'choice' error when running the memes command?
@ColdnessAwaits
@ColdnessAwaits 3 жыл бұрын
Does anyone know why "{len(client.users)}" doesn't actually update? It changes my bots status just fine, but it's stuck as "1" for my member count. I can't seem to get it to change to the actual number of members in my server. It's just stuck as 1.
@GeorgeNeedham
@GeorgeNeedham 2 жыл бұрын
It's finding only the user of the client not the amount of users in each guild
@TipsTricksSolutions
@TipsTricksSolutions 2 жыл бұрын
Thank you so much
@jaspermustasilta6629
@jaspermustasilta6629 3 жыл бұрын
Can u make blackjack with python?
@fishballnooodles1021
@fishballnooodles1021 3 жыл бұрын
Does it work if i add multiple Tasks?
@TechyandGamingDude
@TechyandGamingDude 3 жыл бұрын
Bro it is coming invalid syntax Statuses = activity ...... that listening one
@khairulhaque7623
@khairulhaque7623 2 жыл бұрын
thanks it works
@EmpireAngels
@EmpireAngels 2 жыл бұрын
Can you make an updated version?
@xe9639
@xe9639 3 жыл бұрын
Yes
@LS_Wartaal
@LS_Wartaal 2 жыл бұрын
how do i mention myself in the bot status?
@AryanTheCuber
@AryanTheCuber 3 жыл бұрын
This is not working if I have the Ticket System :(
@icamch
@icamch 3 жыл бұрын
Next Economy Series pls:) Edit : Next how to use items
@putacaralho8963
@putacaralho8963 3 жыл бұрын
That would be great 👍🏻
@pranshusabharwal6738
@pranshusabharwal6738 3 жыл бұрын
yea can you also teach us how to add cooldowns cause people can spam the beg command rn
@icamch
@icamch 3 жыл бұрын
@@pranshusabharwal6738 from discord.ext.commands import BucketType, cooldown @client.command() @commands.cooldown(1, 60, BucketType.user) async def bfg(ctx): await open_account(ctx.author) user = ctx.author users = await get_bank_data() earnings = random.randrange(5000) await ctx.send(f'***Someone gave you {earnings}💎 Gems!!***') users[str(user.id)]["Gems"] += earnings with open("mainbank.json", "w") as f: json.dump(users, f) it's Code Coldowns ... Good luck:)
@pranshusabharwal6738
@pranshusabharwal6738 3 жыл бұрын
@@icamch thanks
@icamch
@icamch 3 жыл бұрын
@@pranshusabharwal6738 Okey
@whimsye
@whimsye 3 жыл бұрын
can i get the code? please
@jemimahhh5935
@jemimahhh5935 3 жыл бұрын
the status doesn’t show up for me
@Smugify
@Smugify 3 жыл бұрын
can you do the status for yourself? as in like your account instead of thebot
@vokuno
@vokuno 3 жыл бұрын
yeah, bot.run('put your token here', bot=False)
@abyssfnm9476
@abyssfnm9476 3 жыл бұрын
how about instead of servers it streams total members of every server its in
@NoOne-de3oc
@NoOne-de3oc 3 жыл бұрын
You can do that
@aadhiseshandc7260
@aadhiseshandc7260 3 жыл бұрын
It didnt work :( @client.event async def on_ready(): #STATUS await client.change_presence(activity=discord.Activity (type=discord.ActivityType.watching, name= ">help"))
@asitisYT
@asitisYT 3 жыл бұрын
I am not getting ch_pr
@lost_milo2714
@lost_milo2714 3 жыл бұрын
how do i do this wierd f ??
@ter9367
@ter9367 3 жыл бұрын
How to user counter in the status! Please answer=)
@ter9367
@ter9367 3 жыл бұрын
{len(client.users)}
@silverff1633
@silverff1633 3 жыл бұрын
bade log
@malligalliblaa9025
@malligalliblaa9025 3 жыл бұрын
can you make a video on how to make a music bot
@CodeWithSwastik
@CodeWithSwastik 3 жыл бұрын
sure :)
@itztokio8641
@itztokio8641 3 жыл бұрын
change_presence is not defined
@TheSixWingedSeraphim
@TheSixWingedSeraphim 3 жыл бұрын
Does this work on repl.it too?
@monilworld
@monilworld Жыл бұрын
😢 Nope
@kartikthakur3376
@kartikthakur3376 3 жыл бұрын
dude you are so damn good at coding..... i will be glad to know if u share from where u gain all these python skills..
@CodeWithSwastik
@CodeWithSwastik 3 жыл бұрын
I have leant python from KZfaq and reading documentation :)
@kartikthakur3376
@kartikthakur3376 3 жыл бұрын
@@CodeWithSwastik Any good creator that you can recommend to me ?
@CodeWithSwastik
@CodeWithSwastik 3 жыл бұрын
@@kartikthakur3376 Tech with tim is very cool for python
@suchitayadav3327
@suchitayadav3327 3 жыл бұрын
Which application do you use to write these scripts?
@sarpsadettinoglu9595
@sarpsadettinoglu9595 3 жыл бұрын
sublime text
@mujtabanaveed3583
@mujtabanaveed3583 3 жыл бұрын
economy bot idea:How to make an inventory Normal discord.py idea:Different prefixes in every server PS: I need help i followed the 2nd part of the economy bot and it gives me an error i only wanted give command so i made the helper function and the send command but when i used it gave me an error "Member is an required arguement which is missing"
@CodeWithSwastik
@CodeWithSwastik 3 жыл бұрын
In part 3 of the economy bot I have shown the inventory. I'll make a video about custom prefixes soon. You need to mention the person who ur sending the money to
@mujtabanaveed3583
@mujtabanaveed3583 3 жыл бұрын
@@CodeWithSwastik I did but it never said anything like the you sent amount thing :c
@mujtabanaveed3583
@mujtabanaveed3583 3 жыл бұрын
@@CodeWithSwastik anyways i am very happy that you actually respond to the comments :D and i've just started python discord.py and only your tutorials help me out :>>
@tahmid6050
@tahmid6050 3 жыл бұрын
hey why did you remove client.run() ? i think thats why my bot is not working
@CodeWithSwastik
@CodeWithSwastik 3 жыл бұрын
I never removed it
@tahmid6050
@tahmid6050 3 жыл бұрын
@@CodeWithSwastik 5:37
@Skyyy671
@Skyyy671 21 күн бұрын
100th comment!
@lkogangster9162
@lkogangster9162 2 жыл бұрын
File "main.py", line 26 await asyncio.sleep(10) ^ SyntaxError: invalid syntax
@user-ou6fi4cr2x
@user-ou6fi4cr2x 2 жыл бұрын
Check that you have registered import asyncio
@pranav5425
@pranav5425 3 жыл бұрын
please make a music bot please
@yasir1492
@yasir1492 3 жыл бұрын
Make a video on hosting a discord bot
@CodeWithSwastik
@CodeWithSwastik 3 жыл бұрын
Yes I'll make one about hosting
@priyantejwani6361
@priyantejwani6361 3 жыл бұрын
@@CodeWithSwastik not heroku or repl!
@abhishekroy3369
@abhishekroy3369 3 жыл бұрын
Make a music bot
@CodeWithSwastik
@CodeWithSwastik 3 жыл бұрын
Yes
@fikajlo
@fikajlo 3 жыл бұрын
Do a video on openCV
@CodeWithSwastik
@CodeWithSwastik 3 жыл бұрын
Sure 😊
@fikajlo
@fikajlo 3 жыл бұрын
@@CodeWithSwastik awesome
@nukegods7359
@nukegods7359 3 жыл бұрын
hello i sub and join ur server can i get the #new join role or like idk
@zorodjuro9115
@zorodjuro9115 3 жыл бұрын
PS C:\Users\MS\Desktop> & C:/Users/MS/AppData/Local/Programs/Python/Python38-32/python.exe c:/Users/MS/Desktop/bot.py Traceback (most recent call last): File "c:/Users/MS/Desktop/bot.py", line 4, in client = commands.bot(command_prefix=">") TypeError: 'module' object is not callable
@potato420
@potato420 3 жыл бұрын
its commands.Bot with a capital B
@muhammadshafeeq8779
@muhammadshafeeq8779 3 жыл бұрын
if i could pay 1000 dollars to give u a million subs i would
@CodeWithSwastik
@CodeWithSwastik 3 жыл бұрын
If you want to support me you can do so on patreon:- patreon.com/codewithswastik
How to make a Giveaway bot with Discord.py | Giveaway Command [ Part 1 ]
9:54
The Mysterious Discord Accounts with Strange Quotes
8:37
No Text To Speech
Рет қаралды 390 М.
НРАВИТСЯ ЭТОТ ФОРМАТ??
00:37
МЯТНАЯ ФАНТА
Рет қаралды 7 МЛН
Amazing weight loss transformation !! 😱😱
00:24
Tibo InShape
Рет қаралды 61 МЛН
EVOLUTION OF ICE CREAM 😱 #shorts
00:11
Savage Vlogs
Рет қаралды 8 МЛН
How to make an Economy Discord Bot Python | Discord.py 2020
13:48
Code With Swastik
Рет қаралды 111 М.
What if ChatGPT became a Discord Admin?
9:13
Code With Swastik
Рет қаралды 3 М.
[NEW] Slash Commands in Less than 10 Minutes Using Discord.PY
5:55
Making a Discord Bot In Python (Part 1: Setup)
12:59
Paradoxial
Рет қаралды 53 М.
Making A Discord Bot In Python (Part 4: Cogs)
15:14
Paradoxial
Рет қаралды 17 М.
iPhone socket cleaning #Fixit
0:30
Tamar DB (mt)
Рет қаралды 17 МЛН
Как удвоить напряжение? #электроника #умножитель
1:00
Hi Dev! – Электроника
Рет қаралды 1,1 МЛН
Это - iPhone 16 и вот что надо знать...
17:20
Overtake lab
Рет қаралды 138 М.