This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
If you are not using this inside a cog, add the event decorator e.g: | |
@bot.event | |
async def on_command_error(ctx, error) | |
For examples of cogs see: | |
https://gist.github.com/EvieePy/d78c061a4798ae81be9825468fe146be | |
For a list of exceptions: | |
https://discordpy.readthedocs.io/en/latest/ext/commands/api.html#exceptions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from discord.ext import commands | |
description = '''An example bot to showcase the discord.ext.commands extension | |
module. | |
There are a number of utility commands being showcased here.''' | |
# this specifies what extensions to load when the bot starts up | |
startup_extensions = ["members", "rng"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Copyright (C) 2013 Ahmed Samy <[email protected]>, MIT. | |
Retrive command line arguments and output them to stdout. | |
Compile: | |
gcc cmd.S | |
Run: | |
./a.out 1 2 3 | |
Should output: | |
There are 4 params: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
A Minimal Capture Program | |
This program opens an audio interface for capture, configures it for | |
stereo, 16 bit, 44.1kHz, interleaved conventional read/write | |
access. Then its reads a chunk of random data from it, and exits. It | |
isn't meant to be a real program. | |
From on Paul David's tutorial : http://equalarea.com/paul/alsa-audio.html |