-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
116 additions
and
14 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
import discord | ||
from discord.ext import commands | ||
import os | ||
import datetime | ||
import DenzGraphingApiWrapper_py as GraphingApi #pip install DenzGraphingApiWrapper-py | ||
|
||
bot = commands.Bot(command_prefix=(">")) | ||
|
||
@bot.event | ||
async def on_connect(): | ||
print("the bot is ready") | ||
|
||
@bot.event | ||
async def on_ready(): | ||
print(f'We have logged in as {bot.user}\n') | ||
|
||
@bot.event | ||
async def on_command_error(ctx, error): | ||
raise error | ||
|
||
@bot.command() | ||
async def pythonanywhere_graph(ctx, formula): | ||
url = GraphingApi.py_anywhere_graph(formula) | ||
await ctx.send(url) | ||
|
||
@bot.command() | ||
async def heroku_graph(ctx, formula): | ||
url = GraphingApi.heroku_graph(formula) | ||
await ctx.send(url) | ||
|
||
@bot.command() | ||
async def pythonanywhere_graph_with_Embed(ctx, formula): | ||
url = GraphingApi.py_anywhere_graph(formula) | ||
embed = discord.Embed(title = f' the graphical representation of \n ```{formula} = 0```',color = discord.Color.green(),url = url) | ||
embed.set_image(url = url) | ||
embed.timestamp = datetime.datetime.utcnow() | ||
embed.set_footer(text=f'rendered by {ctx.author.name}',icon_url=ctx.author.avatar_url) | ||
await ctx.send(embed=embed) | ||
|
||
@bot.command() | ||
async def heroku_graph_with_Embed(ctx, formula): | ||
url = GraphingApi.heroku_graph(formula) | ||
embed = discord.Embed(title = f' the graphical representation of \n ```{formula} = 0```',color = discord.Color.green(),url = url) | ||
embed.set_image(url = url) | ||
embed.timestamp = datetime.datetime.utcnow() | ||
embed.set_footer(text=f'rendered by {ctx.author.name}',icon_url=ctx.author.avatar_url) | ||
await ctx.send(embed=embed) | ||
|
||
@bot.command() | ||
async def github(ctx): | ||
await ctx.send("https://github.com/denzven/DenzGraphingApiWrapper_py") | ||
|
||
@bot.command() | ||
async def docs(ctx): | ||
await ctx.send("https://denzgraphingapiwrapper-py.readthedocs.io/en/latest/") | ||
|
||
@bot.command() | ||
async def pypi(ctx): | ||
await ctx.send("https://pypi.org/project/DenzGraphingApiWrapper-py/") | ||
|
||
@bot.command() | ||
async def test_pypi(ctx): | ||
await ctx.send("https://test.pypi.org/project/DenzGraphingApiWrapper-py-denzven/") | ||
|
||
@bot.command() | ||
async def code(ctx): | ||
await ctx.send(file = discord.File(r'main.py'), content = "Here is the Code of This Bot") | ||
|
||
bot.run(os.environ['bottoken']) #69 nice |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
Metadata-Version: 2.1 | ||
Name: DenzGraphingApiWrapper-py | ||
Version: 0.0.1 | ||
Summary: An ApiWrapper for the DenzGraphingApi | ||
Home-page: UNKNOWN | ||
Author: Denzven | ||
Author-email: denzvenvadakkan@gmail.com | ||
License: UNKNOWN | ||
Project-URL: Bug Tracker, https://github.com/denzven/DenzGraphingApiWrapper_py/issues | ||
Project-URL: Documentation, https://denzgraphingapiwrapper-py.readthedocs.io/en/latest/ | ||
Project-URL: Source, https://github.com/denzven/DenzGraphingApiWrapper_py | ||
Platform: UNKNOWN | ||
Classifier: Programming Language :: Python :: 3 | ||
Classifier: License :: OSI Approved :: MIT License | ||
Classifier: Operating System :: OS Independent | ||
Requires-Python: >=3.6 | ||
Description-Content-Type: text/markdown | ||
|
||
# DenzGraphingApiWrapper_py | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
README.md | ||
pyproject.toml | ||
setup.cfg | ||
src/DenzGraphingApiWrapper_py/__init__.py | ||
src/DenzGraphingApiWrapper_py.egg-info/PKG-INFO | ||
src/DenzGraphingApiWrapper_py.egg-info/SOURCES.txt | ||
src/DenzGraphingApiWrapper_py.egg-info/dependency_links.txt | ||
src/DenzGraphingApiWrapper_py.egg-info/top_level.txt |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
DenzGraphingApiWrapper_py |