pawel02 / music_bot

Music discord bot with all the functionality you'll ever want
66 stars 91 forks source link

Issue On music_cog.py #21

Open drasmodeus666 opened 1 year ago

drasmodeus666 commented 1 year ago

File "f:\music_bot-main\main.py", line 7, in from music_cog import music_cog File "f:\music_bot-main\music_cog.py", line 95 self.is_playing = False TabError: inconsistent use of tabs and spaces in indentation

How can i fix that?

Carlover101 commented 1 year ago

Sometimes when you copy and paste from one IDE to another, the tabs and spaces will get mixed up. The best way to get rid of this is to delete the tabs that have red lines next to them and re-add them. Hope this helps!

pouya5148 commented 1 year ago
@commands.command(name="pause", help="Pauses the current song being played")
async def pause(self, ctx, *args):
    if self.is_playing:
        self.is_playing = False
        self.is_paused = True
        self.vc.pause()
    elif self.is_paused:
        self.is_paused = False
        self.is_playing = True
        self.vc.resume()

@commands.command(name="resume", aliases=["r"], help="Resumes playing with the discord bot")
async def resume(self, ctx, *args):
    if self.is_paused:
        self.is_paused = False
        self.is_playing = True
        self.vc.resume()

@commands.command(name="skip", aliases=["s"], help="Skips the current song being played")
async def skip(self, ctx):
    if self.vc != None and self.vc:
        self.vc.stop()
        #try to play next in the queue if it exists
        await self.play_music(ctx)