Are you a 10x Developer? [Live Coding Recap]
Tags: python, beginners, livecoding, twitch
Published: 2019-11-08 01:15:25

## Streamed: 11/01 on Twitch
🔴 **Watch** ⇒ [Twitch VOD](https://www.twitch.tv/videos/502812223) (replay)

Tonight we hung out and celebrated news of the [Microsoft MVP award](https://mvp.microsoft.com/en-us/PublicProfile/5003518?fullName=Krissy%20Heishman) then got to work on DeepThonk (the Python bot's) code!

### You heard me. 😭🎉

![BIG NEWS](https://i.imgur.com/a6G7CjU.png)

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](https://twitch.tv/ninjabunny9000) or [Twitter](https://www.twitter.com/ninjabunny9000). :D

**Language(s) Used:** [Python](http://bit.ly/nb9kPython)
**Tech & lib(s) used:** [VSCode](http://bit.ly/vscodenb9k), [TwitchIO](https://github.com/TwitchIO/TwitchIO)
**Project Repository** [⭐ **DeepThonk**](http://bit.ly/DeepThonkRepo)


> 👇 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](https://twitter.com/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](https://www.twitch.tv/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.

```python
# 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)
```

Here's a sample of it in action!

![xlev example](https://i.imgur.com/sEI9RRd.png)

### 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. 

```python
# 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)
```

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

![shoutout cmd](https://i.imgur.com/AZNIz9J.png)

We also fixed an issue with the [founder's badges](https://help.twitch.tv/s/article/founders-badge?language=it_IT) 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](https://i.imgur.com/dVJpuHO.png)

```python
# in permissions-check function
    if 'founder' in ctx.author.badges.keys():
        ctx.author.subscriber = 1
```

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](https://www.twitter.com/ninjabunny9000).

I stream Python coding & _lame jokes™_ on [Twitch](https://twitch.tv/ninjabunny9000) every Tuesday, Thursday, & Saturday around 7pm PST.

💜 **Follow on [Twitch](http://bit.ly/nb9kTwitch)**