Compare commits

..

No commits in common. "04647424eb0c99981d6649a95b07f03f5f57a648" and "f602403eab8c97f07a85350d0a0b22ec88e7214d" have entirely different histories.

2 changed files with 2 additions and 97 deletions

View File

@ -1,11 +0,0 @@
# Discord Bot Demo
## Install
```pip3 install pipenv```
```pipenv sync```
## Run
```pipenv run start```

View File

@ -1,96 +1,12 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "94c544b3",
"metadata": {},
"source": [
"# Discord Bot"
]
},
{
"cell_type": "markdown",
"id": "d067ec9a",
"metadata": {},
"source": [
"## Create bot"
]
},
{
"cell_type": "markdown",
"id": "349850de",
"metadata": {},
"source": [
"https://discordpy.readthedocs.io/en/stable/discord.html"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "cedc5095",
"id": "538f8cf6",
"metadata": {},
"outputs": [],
"source": [
"token=\"\""
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "d9df2dfa",
"metadata": {},
"outputs": [],
"source": [
"from discord.ext import commands"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "1ea89ae6",
"metadata": {},
"outputs": [],
"source": [
"bot = commands.Bot(command_prefix='!')"
]
},
{
"cell_type": "markdown",
"id": "39a6d65b",
"metadata": {},
"source": [
"### Create a command !echo "
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "92d8a63a",
"metadata": {},
"outputs": [],
"source": [
"@bot.command()\n",
"async def echo(ctx, arg):\n",
" ctx.send(arg)"
]
},
{
"cell_type": "markdown",
"id": "3d1c2f78",
"metadata": {},
"source": [
"### Start the bot"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "ec254e81",
"metadata": {},
"outputs": [],
"source": [
"bot.run(token)"
]
"source": []
}
],
"metadata": {