Are you a 10x Developer? [Live Coding Recap]

๐Ÿ’พ bun9000 - Nov 8 '19 - - Dev Community

Streamed: 11/01 on Twitch

๐Ÿ”ด Watch โ‡’ Twitch VOD (replay)

Tonight we hung out and celebrated news of the Microsoft MVP award then got to work on DeepThonk (the Python bot's) code!

You heard me. ๐Ÿ˜ญ๐ŸŽ‰

BIG NEWS

The big news dropped earlier that day and I've been on a roller-coaster of emotions ever since. Once the award kit comes in, I'll be doing a live unboxing and big fat THANK YOU stream on Twitch or Twitter. :D

Language(s) Used: Python
Tech & lib(s) used: VSCode, TwitchIO
Project Repository โญ DeepThonk

๐Ÿ‘‡ Code & notes from stream down below! :D

During the stream we...

โœ” caught up with everybody in chat
โœ” announced MVP award stuffs!! YAYYY!! ๐ŸŽ‰
โœ” loaded up some new sfx (thanks, Jigo!)
โœ” chat had a blast going HAM with sfx & gifs
โœ” made an !xlev command that determined your dev-level :Kappa:
โœ” whipped up a shoutout func (!so) for sharing streamer info
โœ” fixed issue with founders badges not counting as a subscriber (permissions)
โœ” stretch and snack break
โœ” tried to play fortnite - mistakes wer maed
โœ” started work on random sfx triggered by words in chat (almost done!)
โœ” ended the stream with a raid on JMSWRNR, a very talented artist and developer - check them out!

Here's some code we wrote for the bot...

We made a highly sophisticated chat command that reveals your Dev x-level.

# in cmds.py
@bot.command(name="xlev")
async def xlev(ctx):
    level = random.randint(0, 70)
    msg = f"@{ctx.author.name}, you're totes a {level}x dev! Congrats! ๐ŸŽ‰"
    await ctx.send(msg)
Enter fullscreen mode Exit fullscreen mode

Here's a sample of it in action!

xlev example

Sweet. ;D

We also whipped up a shoutout function (!so) that helps spread the word about awesome streamers that pop in to our chat room.

# in cmds.py
@bot.command(name='so')
async def so(ctx):
    'shouts out a streamer'
    token = ctx.content.split(' ', 1)
    if token[1][0] == '@':
        streamer = token[1][1:]
    else:
        streamer = token[1]
    msg = f"Check out @{streamer}, a super rad streamer and friend of the channel! https://twitch.tv/{streamer}"
    await ctx.send(msg)
Enter fullscreen mode Exit fullscreen mode

Here we have a shoutout of fellow Live Coder and DEV contributor, @talk2megooseman

shoutout cmd

We also fixed an issue with the founder's badges not counting as subscriber badges. Basically, Twitch recently implemented a new feature that lets the first 5-10 subscribers to a channel proudly display their undying support. So, when Founders weren't allowed to use sub-only commands, that made Jigo cri.

founders badge

# in permissions-check function
    if 'founder' in ctx.author.badges.keys():
        ctx.author.subscriber = 1
Enter fullscreen mode Exit fullscreen mode

We started working on the random SFX function as well, but since we didn't figure that during this stream, I'll document that in the recap for the stream where it all comes together and works well. :D

Live Coding Schedule

For the most up to date schedule, check my pinned post on Twitter.

I stream Python coding & lame jokesโ„ข on Twitch every Tuesday, Thursday, & Saturday around 7pm PST.

๐Ÿ’œ Follow on Twitch

. . . . . . . . . . . . . . . . . .
Terabox Video Player