mirror of
https://gitlab.com/MisterBiggs/blog-static.git
synced 2025-06-16 07:06:44 +00:00
921 lines
39 KiB
HTML
921 lines
39 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
<title>Simple Discord Stock Bot</title>
|
|
<meta name="HandheldFriendly" content="True" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<link rel="stylesheet" type="text/css" href="../assets/built/screen.css" />
|
|
<meta
|
|
name="description"
|
|
content="Super simple Discord Bot wrote in Python for displaying the price of a stock, or news about a stock quickly and easily."
|
|
/>
|
|
<link rel="shortcut icon" href="../favicon.png" type="image/png" />
|
|
<link rel="canonical" href="https://simplestockbot.com/" />
|
|
<meta name="referrer" content="no-referrer-when-downgrade" />
|
|
<link
|
|
rel="amphtml"
|
|
href="https://blog.ansonbiggs.com/simple-discord-stock-bot/amp/"
|
|
/>
|
|
<meta property="og:site_name" content="Anson 3D" />
|
|
<meta property="og:type" content="article" />
|
|
<meta property="og:title" content="Simple Discord Stock Bot" />
|
|
<meta
|
|
property="og:description"
|
|
content="Super simple Discord Bot wrote in Python for displaying the price of a stock, or news about a stock quickly and easily."
|
|
/>
|
|
<meta
|
|
property="og:url"
|
|
content="https://blog.ansonbiggs.com/simple-discord-stock-bot/"
|
|
/>
|
|
<meta property="og:image" content="../content/images/2019/01/logo.png" />
|
|
<meta
|
|
property="article:published_time"
|
|
content="2019-06-09T17:00:00.000Z"
|
|
/>
|
|
<meta property="article:modified_time" content="2019-06-10T09:58:43.000Z" />
|
|
<meta property="article:tag" content="Guide" />
|
|
<meta property="article:tag" content="Code" />
|
|
<meta property="article:tag" content="Python" />
|
|
<meta
|
|
property="article:publisher"
|
|
content="https://www.facebook.com/Anson3D"
|
|
/>
|
|
<meta name="twitter:card" content="summary_large_image" />
|
|
<meta name="twitter:title" content="Simple Discord Stock Bot" />
|
|
<meta
|
|
name="twitter:description"
|
|
content="Super simple Discord Bot wrote in Python for displaying the price of a stock, or news about a stock quickly and easily."
|
|
/>
|
|
<meta
|
|
name="twitter:url"
|
|
content="https://blog.ansonbiggs.com/simple-discord-stock-bot/"
|
|
/>
|
|
<meta
|
|
name="twitter:image"
|
|
content="https://blog.ansonbiggs.com/content/images/2019/01/logo.png"
|
|
/>
|
|
<meta name="twitter:label1" content="Written by" />
|
|
<meta name="twitter:data1" content="Anson Biggs" />
|
|
<meta name="twitter:label2" content="Filed under" />
|
|
<meta name="twitter:data2" content="Guide, Code, Python" />
|
|
<meta name="twitter:site" content="@Anson_3D" />
|
|
<meta name="twitter:creator" content="@Anson_3D" />
|
|
<meta property="og:image:width" content="500" />
|
|
<meta property="og:image:height" content="500" />
|
|
<script type="application/ld+json">
|
|
{
|
|
"@context": "https://schema.org",
|
|
"@type": "Article",
|
|
"publisher": {
|
|
"@type": "Organization",
|
|
"name": "Anson 3D",
|
|
"logo": {
|
|
"@type": "ImageObject",
|
|
"url": "https://blog.ansonbiggs.com/favicon.png",
|
|
"width": 60,
|
|
"height": 60
|
|
}
|
|
},
|
|
"author": {
|
|
"@type": "Person",
|
|
"name": "Anson Biggs",
|
|
"image": {
|
|
"@type": "ImageObject",
|
|
"url": "https://blog.ansonbiggs.com/content/images/2019/09/anson_suit_cropped.jpg",
|
|
"width": 1513,
|
|
"height": 1090
|
|
},
|
|
"url": "https://blog.ansonbiggs.com/author/anson/",
|
|
"sameAs": ["http://ansonbiggs.com", "https://twitter.com/AnsonBiggs"]
|
|
},
|
|
"headline": "Simple Discord Stock Bot",
|
|
"url": "https://blog.ansonbiggs.com/simple-discord-stock-bot/",
|
|
"datePublished": "2019-06-09T17:00:00.000Z",
|
|
"dateModified": "2019-06-10T09:58:43.000Z",
|
|
"image": {
|
|
"@type": "ImageObject",
|
|
"url": "https://blog.ansonbiggs.com/content/images/2019/01/logo.png",
|
|
"width": 500,
|
|
"height": 500
|
|
},
|
|
"keywords": "Guide, Code, Python",
|
|
"description": "Super simple Discord Bot wrote in Python for displaying the price of a stock, or news about a stock quickly and easily.",
|
|
"mainEntityOfPage": {
|
|
"@type": "WebPage",
|
|
"@id": "https://blog.ansonbiggs.com/"
|
|
}
|
|
}
|
|
</script>
|
|
<script
|
|
src="../public/ghost-sdk.min.js"
|
|
type="5488e350327db868bae35380-text/javascript"
|
|
></script>
|
|
<script type="5488e350327db868bae35380-text/javascript">
|
|
ghost.init({
|
|
clientId: "ghost-frontend",
|
|
clientSecret: "245af786ee20"
|
|
});
|
|
</script>
|
|
<meta name="generator" content="Ghost 2.31" />
|
|
<link
|
|
rel="alternate"
|
|
type="application/rss+xml"
|
|
title="Anson 3D"
|
|
href="https://blog.ansonbiggs.com/rss/"
|
|
/>
|
|
<script
|
|
async
|
|
src="https://analytics.ansonbiggs.com/tracker.js"
|
|
data-ackee-server="https://analytics.ansonbiggs.com"
|
|
data-ackee-domain-id="0846bb59-c7b6-4a0b-bc05-135f82425319"
|
|
type="5488e350327db868bae35380-text/javascript"
|
|
></script>
|
|
<script
|
|
src="https://unpkg.com/mermaid@8.0.0/dist/mermaid.min.js"
|
|
type="5488e350327db868bae35380-text/javascript"
|
|
></script>
|
|
<script type="5488e350327db868bae35380-text/javascript">
|
|
mermaid.initialize({startOnLoad:true});
|
|
</script>
|
|
|
|
<script
|
|
src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.14.0/prism.min.js"
|
|
type="5488e350327db868bae35380-text/javascript"
|
|
></script>
|
|
<script
|
|
src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.14.0/plugins/line-numbers/prism-line-numbers.min.js"
|
|
type="5488e350327db868bae35380-text/javascript"
|
|
></script>
|
|
<link
|
|
rel="stylesheet"
|
|
type="text/css"
|
|
href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.14.0/themes/prism.min.css"
|
|
/>
|
|
<link
|
|
rel="stylesheet"
|
|
type="text/css"
|
|
href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.14.0/plugins/line-numbers/prism-line-numbers.min.css"
|
|
/>
|
|
<link
|
|
rel="stylesheet"
|
|
type="text/css"
|
|
href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.14.0/themes/prism-coy.min.css"
|
|
/>
|
|
<script
|
|
src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.14.0/components/prism-powershell.min.js"
|
|
type="5488e350327db868bae35380-text/javascript"
|
|
></script>
|
|
<script
|
|
src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.14.0/components/prism-css.min.js"
|
|
type="5488e350327db868bae35380-text/javascript"
|
|
></script>
|
|
<script
|
|
src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.14.0/components/prism-c.min.js"
|
|
type="5488e350327db868bae35380-text/javascript"
|
|
></script>
|
|
<script
|
|
src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.14.0/components/prism-clike.min.js"
|
|
type="5488e350327db868bae35380-text/javascript"
|
|
></script>
|
|
<script
|
|
src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.14.0/components/prism-python.min.js"
|
|
type="5488e350327db868bae35380-text/javascript"
|
|
></script>
|
|
|
|
<script
|
|
async
|
|
src="https://www.googletagmanager.com/gtag/js?id=UA-99766784-3"
|
|
type="5488e350327db868bae35380-text/javascript"
|
|
></script>
|
|
<script type="5488e350327db868bae35380-text/javascript">
|
|
window.dataLayer = window.dataLayer || [];
|
|
function gtag(){dataLayer.push(arguments);}
|
|
gtag('js', new Date());
|
|
|
|
gtag('config', 'UA-99766784-3');
|
|
</script>
|
|
|
|
<script
|
|
data-name="BMC-Widget"
|
|
src="https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js"
|
|
data-id="Anson"
|
|
data-description="Support my work on Buy me a coffee!"
|
|
data-message="Please consider donating if you enjoy my content!"
|
|
data-color="#5F7FFF"
|
|
data-position="right"
|
|
data-x_margin="18"
|
|
data-y_margin="18"
|
|
></script>
|
|
</head>
|
|
|
|
<body class="post-template tag-guide tag-code tag-python">
|
|
<div class="site-wrapper">
|
|
<header class="site-header outer">
|
|
<div class="inner">
|
|
<nav class="site-nav">
|
|
<div class="site-nav-left">
|
|
<a class="site-nav-logo" href="../">Anson 3D</a>
|
|
<ul class="nav" role="menu">
|
|
<li class="nav-home" role="menuitem"><a href="../">Home</a></li>
|
|
<li class="nav-downloads" role="menuitem">
|
|
<a href="../where-to-download-my-models/">Downloads</a>
|
|
</li>
|
|
<li class="nav-yet-another-test-suite" role="menuitem">
|
|
<a href="../yet-another-test-suite/"
|
|
>Yet Another Test Suite</a
|
|
>
|
|
</li>
|
|
<li class="nav-tags" role="menuitem">
|
|
<a href="../tags/">Tags</a>
|
|
</li>
|
|
<li class="nav-resume" role="menuitem">
|
|
<a href="http://ansonbiggs.com">Resume</a>
|
|
</li>
|
|
<li class="nav-partners" role="menuitem">
|
|
<a href="https://projects.ansonbiggs.com">Projects</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="site-nav-right">
|
|
<div class="social-links">
|
|
<a
|
|
class="social-link social-link-fb"
|
|
href="https://www.facebook.com/Anson3D"
|
|
title="Facebook"
|
|
target="_blank"
|
|
rel="noopener"
|
|
><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
|
|
<path
|
|
d="M19 6h5V0h-5c-3.86 0-7 3.14-7 7v3H8v6h4v16h6V16h5l1-6h-6V7c0-.542.458-1 1-1z"
|
|
/>
|
|
</svg>
|
|
</a>
|
|
<a
|
|
class="social-link social-link-tw"
|
|
href="https://twitter.com/AnsonBiggs"
|
|
title="Twitter"
|
|
target="_blank"
|
|
rel="noopener"
|
|
><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
|
|
<path
|
|
d="M30.063 7.313c-.813 1.125-1.75 2.125-2.875 2.938v.75c0 1.563-.188 3.125-.688 4.625a15.088 15.088 0 0 1-2.063 4.438c-.875 1.438-2 2.688-3.25 3.813a15.015 15.015 0 0 1-4.625 2.563c-1.813.688-3.75 1-5.75 1-3.25 0-6.188-.875-8.875-2.625.438.063.875.125 1.375.125 2.688 0 5.063-.875 7.188-2.5-1.25 0-2.375-.375-3.375-1.125s-1.688-1.688-2.063-2.875c.438.063.813.125 1.125.125.5 0 1-.063 1.5-.25-1.313-.25-2.438-.938-3.313-1.938a5.673 5.673 0 0 1-1.313-3.688v-.063c.813.438 1.688.688 2.625.688a5.228 5.228 0 0 1-1.875-2c-.5-.875-.688-1.813-.688-2.75 0-1.063.25-2.063.75-2.938 1.438 1.75 3.188 3.188 5.25 4.25s4.313 1.688 6.688 1.813a5.579 5.579 0 0 1 1.5-5.438c1.125-1.125 2.5-1.688 4.125-1.688s3.063.625 4.188 1.813a11.48 11.48 0 0 0 3.688-1.375c-.438 1.375-1.313 2.438-2.563 3.188 1.125-.125 2.188-.438 3.313-.875z"
|
|
/>
|
|
</svg>
|
|
</a>
|
|
</div>
|
|
<a class="subscribe-button" href="#subscribe">Subscribe</a>
|
|
</div>
|
|
</nav>
|
|
</div>
|
|
</header>
|
|
<main id="site-main" class="site-main outer">
|
|
<div class="inner">
|
|
<article class="post-full post tag-guide tag-code tag-python">
|
|
<header class="post-full-header">
|
|
<section class="post-full-meta">
|
|
<time class="post-full-meta-date" datetime="2019-06-09"
|
|
>9 June 2019</time
|
|
>
|
|
<span class="date-divider">/</span>
|
|
<a href="../tag/guide/">Guide</a>
|
|
</section>
|
|
<h1 class="post-full-title">
|
|
<a href="https://simplestockbot.com/"
|
|
>Simple Discord Stock Bot</a
|
|
>
|
|
</h1>
|
|
</header>
|
|
<figure class="post-full-image">
|
|
<img
|
|
srcset="
|
|
../content/images/size/w300/2019/01/logo.png 300w,
|
|
../content/images/size/w600/2019/01/logo.png 600w,
|
|
../content/images/size/w1000/2019/01/logo.png 1000w,
|
|
../content/images/size/w2000/2019/01/logo.png 2000w
|
|
"
|
|
sizes="(max-width: 800px) 400px,
|
|
(max-width: 1170px) 700px,
|
|
1400px"
|
|
src="../content/images/size/w2000/2019/01/logo.png"
|
|
alt="Simple Discord Stock Bot"
|
|
/>
|
|
</figure>
|
|
<section class="post-full-content">
|
|
<div class="post-content">
|
|
<h1>
|
|
This Content has moved. Get the latest info
|
|
<a href="https://simplestockbot.com/">here.</a>
|
|
</h1>
|
|
<hr />
|
|
<p align="center">
|
|
Discord Bot 🤖 that provides Stock Market information.
|
|
<br />
|
|
</p>
|
|
<h2 id="tableofcontents">📝 Table of Contents</h2>
|
|
<ul>
|
|
<li><a href="#about">About</a></li>
|
|
<li><a href="#working">How it works</a></li>
|
|
<li><a href="#usage">Usage</a></li>
|
|
<li><a href="#getting_started">Getting Started</a></li>
|
|
<li><a href="#deployment">Deploying your own bot</a></li>
|
|
<li><a href="#built_using">Built Using</a></li>
|
|
<li><a href="../contributing.md/">Contributing</a></li>
|
|
<li><a href="#author">author</a></li>
|
|
<li><a href="#acknowledgement">Acknowledgments</a></li>
|
|
</ul>
|
|
<h2 id="aboutanameabouta">🧐 About <a name="about"></a></h2>
|
|
<p>
|
|
This bot aims to be as simple as possible while providing all
|
|
the information you need on the stock market. The motivation
|
|
of this bot is to provide similar stock market functionality
|
|
that the Google Assistant provided in
|
|
<a href="https://gcemetery.co/google-allo/">Google Allo</a>
|
|
before the project was sunset.
|
|
</p>
|
|
<h2 id="howitworksanameworkinga">
|
|
💭 How it works <a name="working"></a>
|
|
</h2>
|
|
<p>
|
|
This bot works by using the
|
|
<a href="https://iexcloud.io/docs/api/">IEX API 2.0</a>. Using
|
|
various endpoints provided by the API, the bot can take either
|
|
take commands from users or check any messages for stock
|
|
symbols as detailed in <a href="#usage">Usage</a>.
|
|
</p>
|
|
<h2 id="usageanameusagea">🎈 Usage <a name="usage"></a></h2>
|
|
<h3 id="basicusage">Basic Usage</h3>
|
|
<p>
|
|
The simplest way to use the bot is just by sending a message
|
|
either as a direct message or in a group chat with the bot
|
|
active. The bot will search every message for text with a
|
|
dollar sign followed by a stock symbol, and it will return the
|
|
full name of the company and the current trading price.
|
|
</p>
|
|
<pre><code>$tsla
|
|
</code></pre>
|
|
<p>
|
|
The symbols can be anywhere in the message, and you can post
|
|
as many as you like so commands such as:
|
|
</p>
|
|
<pre><code>I wonder if $aapl is down as much as $msft is today.
|
|
</code></pre>
|
|
<p>
|
|
would return the stock price of both Apple and Microsoft like
|
|
so:
|
|
</p>
|
|
<pre><code>The current stock price of Microsoft Corp. is $131.4, the stock is currently up 2.8%
|
|
|
|
The current stock price of Apple, Inc. is $190.15, the stock is currently up 2.66%
|
|
</code></pre>
|
|
<h3 id="dividend">/dividend</h3>
|
|
<p>
|
|
To get information about the dividend of a stock type
|
|
<code>/dividend</code> followed by any text that has symbols
|
|
with a dollar sign in front of them. So, the following
|
|
command:
|
|
</p>
|
|
<pre><code>/dividend $psec
|
|
</code></pre>
|
|
<p>
|
|
Would return information about Prospect Capitals dividend:
|
|
</p>
|
|
<pre><code>Prospect Capital Corp. Declares June 2019 Dividend of $0.06 Per Share
|
|
The dividend is in: 38 Days 3 Hours 53 Minutes 22 Seconds.
|
|
</code></pre>
|
|
<h2 id="gettingstartedanamegetting_starteda">
|
|
🏁 Getting Started <a name="getting_started"></a>
|
|
</h2>
|
|
<p>
|
|
You can either choose to use the hosted version of the bot by
|
|
<a
|
|
href="https://discordapp.com/oauth2/authorize?client_id=532045200823025666&permissions=2048&scope=bot"
|
|
>clicking here</a
|
|
>
|
|
or you can host your own bot with the instructions below.
|
|
</p>
|
|
<h3 id="selfhostedbot">Self Hosted Bot</h3>
|
|
<p>
|
|
These instructions will get you a copy of the project up and
|
|
running on your local machine for development and testing
|
|
purposes. See <a href="#deployment">deployment</a> for notes
|
|
on how to deploy the project on a live system.
|
|
</p>
|
|
<h3 id="prerequisites">Prerequisites</h3>
|
|
<p>
|
|
This project runs neatly in a docker container, so all that
|
|
you need to run it yourself is
|
|
<a href="https://hub.docker.com/?overlay=onboarding"
|
|
>Docker</a
|
|
>
|
|
installed on your system.
|
|
</p>
|
|
<p>
|
|
You will also need a Discord API key which can be obtained
|
|
<a href="https://discordapp.com/developers/">here.</a>
|
|
</p>
|
|
<p>
|
|
Finally, you will need and IEX Cloud API key. They offer a
|
|
free tier that should be enough for any private groups, more
|
|
details <a href="https://iexcloud.io/">here.</a>
|
|
</p>
|
|
<h3 id="installing">Installing</h3>
|
|
<p>
|
|
Once Docker is installed and you have your API keys for
|
|
Discord and IEX Cloud getting the bot running on any platform
|
|
is extremely easy.
|
|
</p>
|
|
<p>
|
|
Download or clone the repository to your machine and open a
|
|
terminal in the project and build the Docker container.
|
|
</p>
|
|
<pre><code>docker build -t simple-discord-bot .
|
|
</code></pre>
|
|
<p>Then run the bot using your API keys.</p>
|
|
<pre><code>docker run --detach \
|
|
-e discord=DISCORD_TOKEN \
|
|
-e IEX=IEX_TOKEN \
|
|
simple-discord-bot
|
|
</code></pre>
|
|
<p>
|
|
Your bot should be running! If you are new to Docker, I would
|
|
recommend checking out its documentation for full control over
|
|
your bot.
|
|
</p>
|
|
<h2 id="deployingyourownbotanamedeploymenta">
|
|
🚀 Deploying your own bot <a name="deployment"></a>
|
|
</h2>
|
|
<p>
|
|
I recommend Digital Ocean for small projects like this because
|
|
it is straightforward to use and affordable.
|
|
<a href="https://m.do.co/c/6b5df7ef55b6"
|
|
>Sign up with my referral code, and we both get some free
|
|
hosting.</a
|
|
>
|
|
</p>
|
|
<h2 id="builtusinganamebuilt_usinga">
|
|
⛏️ Built Using <a name="built_using"></a>
|
|
</h2>
|
|
<ul>
|
|
<li>
|
|
<a href="https://github.com/Rapptz/discord.py"
|
|
>discord.py</a
|
|
>
|
|
- Python Discord API Wrapper
|
|
</li>
|
|
<li>
|
|
<a href="https://www.digitalocean.com/">Digital Ocean</a> -
|
|
IaaS hosting platform
|
|
</li>
|
|
</ul>
|
|
<h2 id="authoranameauthora">✍️ author <a name="author"></a></h2>
|
|
<ul>
|
|
<li>
|
|
<a href="../author/anson/">Anson Biggs</a> - The one and
|
|
only
|
|
</li>
|
|
</ul>
|
|
<h2 id="acknowledgementsanameacknowledgementa">
|
|
🎉 Acknowledgements <a name="acknowledgement"></a>
|
|
</h2>
|
|
<ul>
|
|
<li>Discord for having a great bot API</li>
|
|
<li>IEX Cloud for offering a free tier</li>
|
|
<li>Viewers like you ♥</li>
|
|
</ul>
|
|
</div>
|
|
</section>
|
|
<section class="subscribe-form">
|
|
<h3 class="subscribe-form-title">Subscribe to Anson 3D</h3>
|
|
<p>Get the latest posts delivered right to your inbox</p>
|
|
<form method="post" action="/subscribe/" id class>
|
|
<input class="confirm" type="hidden" name="confirm" /><input
|
|
class="location"
|
|
type="hidden"
|
|
name="location"
|
|
/><input class="referrer" type="hidden" name="referrer" />
|
|
<div class="form-group">
|
|
<input
|
|
class="subscribe-email"
|
|
type="email"
|
|
name="email"
|
|
placeholder="youremail@example.com"
|
|
/>
|
|
</div>
|
|
<button id class type="submit"><span>Subscribe</span></button>
|
|
<script type="5488e350327db868bae35380-text/javascript">
|
|
(function(g,h,o,s,t){
|
|
var buster = function(b,m) {
|
|
h[o]('input.'+b).forEach(function (i) {
|
|
i.value=i.value || m;
|
|
});
|
|
};
|
|
buster('location', g.location.href);
|
|
buster('referrer', h.referrer);
|
|
})(window,document,'querySelectorAll','value');
|
|
</script>
|
|
</form>
|
|
</section>
|
|
<footer class="post-full-footer">
|
|
<section class="author-card">
|
|
<img
|
|
class="author-profile-image"
|
|
src="../content/images/size/w100/2019/09/anson_suit_cropped.jpg"
|
|
alt="Anson Biggs"
|
|
/>
|
|
<section class="author-card-content">
|
|
<h4 class="author-card-name">
|
|
<a href="../author/anson/">Anson Biggs</a>
|
|
</h4>
|
|
<p>
|
|
I am an undergraduate Aerospace Engineering student with a
|
|
focus on Astronautics and a minor in Electronic Engineering
|
|
studying at Embry-Riddle Aeronautical University in
|
|
Prescott, Arizona.
|
|
</p>
|
|
</section>
|
|
</section>
|
|
<div class="post-full-footer-right">
|
|
<a class="author-card-button" href="../author/anson/"
|
|
>Read More</a
|
|
>
|
|
</div>
|
|
</footer>
|
|
</article>
|
|
</div>
|
|
</main>
|
|
<aside class="read-next outer">
|
|
<div class="inner">
|
|
<div class="read-next-feed">
|
|
<article
|
|
class="read-next-card"
|
|
style="
|
|
background-image: url(../content/images/size/w600/2018/08/007---3kLkMUL-1.jpg);
|
|
"
|
|
>
|
|
<header class="read-next-card-header">
|
|
<small class="read-next-card-header-sitetitle"
|
|
>— Anson 3D —</small
|
|
>
|
|
<h3 class="read-next-card-header-title">
|
|
<a href="../tag/guide/">Guide</a>
|
|
</h3>
|
|
</header>
|
|
<div class="read-next-divider">
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
<path
|
|
d="M13 14.5s2 3 5 3 5.5-2.463 5.5-5.5S21 6.5 18 6.5c-5 0-7 11-12 11C2.962 17.5.5 15.037.5 12S3 6.5 6 6.5s4.5 3.5 4.5 3.5"
|
|
/>
|
|
</svg>
|
|
</div>
|
|
<div class="read-next-card-content">
|
|
<ul>
|
|
<li>
|
|
<a href="../how-to-use-mermaid/"
|
|
>How to use Mermaid on your Ghost Blog</a
|
|
>
|
|
</li>
|
|
<li>
|
|
<a
|
|
href="../how-to-export-fusion-360-files-to-other-file-types/"
|
|
>How to Export Fusion 360 files to Other File Types</a
|
|
>
|
|
</li>
|
|
<li>
|
|
<a href="../putting-fusion-360-models-on-facebook/"
|
|
>Putting Fusion 360 Models on Facebook</a
|
|
>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<footer class="read-next-card-footer">
|
|
<a href="../tag/guide/">See all 6 posts →</a>
|
|
</footer>
|
|
</article>
|
|
<article class="post-card post tag-python tag-code">
|
|
<a
|
|
class="post-card-image-link"
|
|
href="../simple-telegram-stock-bot/"
|
|
>
|
|
<img
|
|
class="post-card-image"
|
|
srcset="
|
|
../content/images/size/w300/2019/06/Stock-Bot--1-.png 300w,
|
|
../content/images/size/w600/2019/06/Stock-Bot--1-.png 600w,
|
|
../content/images/size/w1000/2019/06/Stock-Bot--1-.png 1000w,
|
|
../content/images/size/w2000/2019/06/Stock-Bot--1-.png 2000w
|
|
"
|
|
sizes="(max-width: 1000px) 400px, 700px"
|
|
src="../content/images/size/w600/2019/06/Stock-Bot--1-.png"
|
|
alt="Simple Telegram Stock Bot"
|
|
/>
|
|
</a>
|
|
<div class="post-card-content">
|
|
<a
|
|
class="post-card-content-link"
|
|
href="../simple-telegram-stock-bot/"
|
|
>
|
|
<header class="post-card-header">
|
|
<span class="post-card-tags">Python</span>
|
|
<h2 class="post-card-title">Simple Telegram Stock Bot</h2>
|
|
</header>
|
|
<section class="post-card-excerpt">
|
|
<p>
|
|
Super simple Telegram Bot wrote in Python for displaying
|
|
the price of a stock, or news about a stock quickly and
|
|
easily.
|
|
</p>
|
|
</section>
|
|
</a>
|
|
<footer class="post-card-meta">
|
|
<ul class="author-list">
|
|
<li class="author-list-item">
|
|
<div class="author-name-tooltip">Anson Biggs</div>
|
|
<a href="../author/anson/" class="static-avatar">
|
|
<img
|
|
class="author-profile-image"
|
|
src="../content/images/size/w100/2019/09/anson_suit_cropped.jpg"
|
|
alt="Anson Biggs"
|
|
/>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
<span class="reading-time">3 min read</span>
|
|
</footer>
|
|
</div>
|
|
</article>
|
|
<article
|
|
class="post-card post tag-3d-modeling tag-3d-printing tag-functional-print tag-fusion360 tag-oldie featured"
|
|
>
|
|
<a class="post-card-image-link" href="../oldie-vice-v2/">
|
|
<img
|
|
class="post-card-image"
|
|
srcset="
|
|
../content/images/size/w300/2019/02/Oldie-Vice-V2.png 300w,
|
|
../content/images/size/w600/2019/02/Oldie-Vice-V2.png 600w,
|
|
../content/images/size/w1000/2019/02/Oldie-Vice-V2.png 1000w,
|
|
../content/images/size/w2000/2019/02/Oldie-Vice-V2.png 2000w
|
|
"
|
|
sizes="(max-width: 1000px) 400px, 700px"
|
|
src="../content/images/size/w600/2019/02/Oldie-Vice-V2.png"
|
|
alt="Oldie Vice V2"
|
|
/>
|
|
</a>
|
|
<div class="post-card-content">
|
|
<a class="post-card-content-link" href="../oldie-vice-v2/">
|
|
<header class="post-card-header">
|
|
<span class="post-card-tags">3D Modeling</span>
|
|
<h2 class="post-card-title">Oldie Vice V2</h2>
|
|
</header>
|
|
<section class="post-card-excerpt">
|
|
<p>
|
|
SummaryThis is the second iteration of a 3D printable Vice
|
|
made by Machinist Extraordinaire, This Old Tony recently
|
|
put out a video on a cool vice design that I wanted to
|
|
recreate. Now
|
|
</p>
|
|
</section>
|
|
</a>
|
|
<footer class="post-card-meta">
|
|
<ul class="author-list">
|
|
<li class="author-list-item">
|
|
<div class="author-name-tooltip">Anson Biggs</div>
|
|
<a href="../author/anson/" class="static-avatar">
|
|
<img
|
|
class="author-profile-image"
|
|
src="../content/images/size/w100/2019/09/anson_suit_cropped.jpg"
|
|
alt="Anson Biggs"
|
|
/>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
<span class="reading-time">5 min read</span>
|
|
</footer>
|
|
</div>
|
|
</article>
|
|
</div>
|
|
</div>
|
|
</aside>
|
|
<div class="floating-header">
|
|
<div class="floating-header-logo">
|
|
<a href="../">
|
|
<img
|
|
src="../content/images/size/w30/2018/08/Anson.png"
|
|
alt="Anson 3D icon"
|
|
/>
|
|
<span>Anson 3D</span>
|
|
</a>
|
|
</div>
|
|
<span class="floating-header-divider">—</span>
|
|
<div class="floating-header-title">Simple Discord Stock Bot</div>
|
|
<div class="floating-header-share">
|
|
<div class="floating-header-share-label">
|
|
Share this
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
<path
|
|
d="M7.5 15.5V4a1.5 1.5 0 1 1 3 0v4.5h2a1 1 0 0 1 1 1h2a1 1 0 0 1 1 1H18a1.5 1.5 0 0 1 1.5 1.5v3.099c0 .929-.13 1.854-.385 2.748L17.5 23.5h-9c-1.5-2-5.417-8.673-5.417-8.673a1.2 1.2 0 0 1 1.76-1.605L7.5 15.5zm6-6v2m-3-3.5v3.5m6-1v2"
|
|
/>
|
|
</svg>
|
|
</div>
|
|
<a
|
|
class="floating-header-share-tw"
|
|
href="https://twitter.com/share?text=Simple%20Discord%20Stock%20Bot&url=https://blog.ansonbiggs.com/simple-discord-stock-bot/"
|
|
onclick="if (!window.__cfRLUnblockHandlers) return false; window.open(this.href, 'share-twitter', 'width=550,height=235');return false;"
|
|
data-cf-modified-5488e350327db868bae35380-
|
|
>
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
|
|
<path
|
|
d="M30.063 7.313c-.813 1.125-1.75 2.125-2.875 2.938v.75c0 1.563-.188 3.125-.688 4.625a15.088 15.088 0 0 1-2.063 4.438c-.875 1.438-2 2.688-3.25 3.813a15.015 15.015 0 0 1-4.625 2.563c-1.813.688-3.75 1-5.75 1-3.25 0-6.188-.875-8.875-2.625.438.063.875.125 1.375.125 2.688 0 5.063-.875 7.188-2.5-1.25 0-2.375-.375-3.375-1.125s-1.688-1.688-2.063-2.875c.438.063.813.125 1.125.125.5 0 1-.063 1.5-.25-1.313-.25-2.438-.938-3.313-1.938a5.673 5.673 0 0 1-1.313-3.688v-.063c.813.438 1.688.688 2.625.688a5.228 5.228 0 0 1-1.875-2c-.5-.875-.688-1.813-.688-2.75 0-1.063.25-2.063.75-2.938 1.438 1.75 3.188 3.188 5.25 4.25s4.313 1.688 6.688 1.813a5.579 5.579 0 0 1 1.5-5.438c1.125-1.125 2.5-1.688 4.125-1.688s3.063.625 4.188 1.813a11.48 11.48 0 0 0 3.688-1.375c-.438 1.375-1.313 2.438-2.563 3.188 1.125-.125 2.188-.438 3.313-.875z"
|
|
/>
|
|
</svg>
|
|
</a>
|
|
<a
|
|
class="floating-header-share-fb"
|
|
href="https://www.facebook.com/sharer/sharer.php?u=https://blog.ansonbiggs.com/simple-discord-stock-bot/"
|
|
onclick="if (!window.__cfRLUnblockHandlers) return false; window.open(this.href, 'share-facebook','width=580,height=296');return false;"
|
|
data-cf-modified-5488e350327db868bae35380-
|
|
>
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
|
|
<path
|
|
d="M19 6h5V0h-5c-3.86 0-7 3.14-7 7v3H8v6h4v16h6V16h5l1-6h-6V7c0-.542.458-1 1-1z"
|
|
/>
|
|
</svg>
|
|
</a>
|
|
</div>
|
|
<progress id="reading-progress" class="progress" value="0">
|
|
<div class="progress-container">
|
|
<span class="progress-bar"></span>
|
|
</div>
|
|
</progress>
|
|
</div>
|
|
<footer class="site-footer outer">
|
|
<div class="site-footer-content inner">
|
|
<section class="copyright">
|
|
<a href="../">Anson 3D</a> © 2019
|
|
</section>
|
|
<nav class="site-footer-nav">
|
|
<a href="../">Latest Posts</a>
|
|
<a
|
|
href="https://www.facebook.com/Anson3D"
|
|
target="_blank"
|
|
rel="noopener"
|
|
>Facebook</a
|
|
>
|
|
<a
|
|
href="https://twitter.com/AnsonBiggs"
|
|
target="_blank"
|
|
rel="noopener"
|
|
>Twitter</a
|
|
>
|
|
<a href="https://ghost.org" target="_blank" rel="noopener">Ghost</a>
|
|
</nav>
|
|
</div>
|
|
</footer>
|
|
</div>
|
|
<div id="subscribe" class="subscribe-overlay">
|
|
<a class="subscribe-overlay-close" href="#"></a>
|
|
<div class="subscribe-overlay-content">
|
|
<h1 class="subscribe-overlay-title">Subscribe to Anson 3D</h1>
|
|
<p class="subscribe-overlay-description">
|
|
Stay up to date! Get all the latest & greatest posts delivered
|
|
straight to your inbox
|
|
</p>
|
|
<form method="post" action="/subscribe/" id class>
|
|
<input class="confirm" type="hidden" name="confirm" /><input
|
|
class="location"
|
|
type="hidden"
|
|
name="location"
|
|
/><input class="referrer" type="hidden" name="referrer" />
|
|
<div class="form-group">
|
|
<input
|
|
class="subscribe-email"
|
|
type="email"
|
|
name="email"
|
|
placeholder="youremail@example.com"
|
|
/>
|
|
</div>
|
|
<button id class type="submit"><span>Subscribe</span></button>
|
|
<script type="5488e350327db868bae35380-text/javascript">
|
|
(function(g,h,o,s,t){
|
|
var buster = function(b,m) {
|
|
h[o]('input.'+b).forEach(function (i) {
|
|
i.value=i.value || m;
|
|
});
|
|
};
|
|
buster('location', g.location.href);
|
|
buster('referrer', h.referrer);
|
|
})(window,document,'querySelectorAll','value');
|
|
</script>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
<script type="5488e350327db868bae35380-text/javascript">
|
|
var images = document.querySelectorAll('.kg-gallery-image img');
|
|
images.forEach(function (image) {
|
|
var container = image.closest('.kg-gallery-image');
|
|
var width = image.attributes.width.value;
|
|
var height = image.attributes.height.value;
|
|
var ratio = width / height;
|
|
container.style.flex = ratio + ' 1 0%';
|
|
})
|
|
</script>
|
|
<script
|
|
src="https://code.jquery.com/jquery-3.2.1.min.js"
|
|
crossorigin="anonymous"
|
|
type="5488e350327db868bae35380-text/javascript"
|
|
></script>
|
|
<script
|
|
type="5488e350327db868bae35380-text/javascript"
|
|
src="../assets/built/jquery.fitvids.js"
|
|
></script>
|
|
<script
|
|
src="../assets/built/infinitescroll.js"
|
|
type="5488e350327db868bae35380-text/javascript"
|
|
></script>
|
|
<script type="5488e350327db868bae35380-text/javascript">
|
|
|
|
// NOTE: Scroll performance is poor in Safari
|
|
// - this appears to be due to the events firing much more slowly in Safari.
|
|
// Dropping the scroll event and using only a raf loop results in smoother
|
|
// scrolling but continuous processing even when not scrolling
|
|
$(document).ready(function () {
|
|
// Start fitVids
|
|
var $postContent = $(".post-full-content");
|
|
$postContent.fitVids();
|
|
// End fitVids
|
|
|
|
var progressBar = document.querySelector('#reading-progress');
|
|
var header = document.querySelector('.floating-header');
|
|
var title = document.querySelector('.post-full-title');
|
|
|
|
var lastScrollY = window.scrollY;
|
|
var lastWindowHeight = window.innerHeight;
|
|
var lastDocumentHeight = $(document).height();
|
|
var ticking = false;
|
|
|
|
function onScroll() {
|
|
lastScrollY = window.scrollY;
|
|
requestTick();
|
|
}
|
|
|
|
function onResize() {
|
|
lastWindowHeight = window.innerHeight;
|
|
lastDocumentHeight = $(document).height();
|
|
requestTick();
|
|
}
|
|
|
|
function requestTick() {
|
|
if (!ticking) {
|
|
requestAnimationFrame(update);
|
|
}
|
|
ticking = true;
|
|
}
|
|
|
|
function update() {
|
|
var trigger = title.getBoundingClientRect().top + window.scrollY;
|
|
var triggerOffset = title.offsetHeight + 35;
|
|
var progressMax = lastDocumentHeight - lastWindowHeight;
|
|
|
|
// show/hide floating header
|
|
if (lastScrollY >= trigger + triggerOffset) {
|
|
header.classList.add('floating-active');
|
|
} else {
|
|
header.classList.remove('floating-active');
|
|
}
|
|
|
|
progressBar.setAttribute('max', progressMax);
|
|
progressBar.setAttribute('value', lastScrollY);
|
|
|
|
ticking = false;
|
|
}
|
|
|
|
window.addEventListener('scroll', onScroll, {passive: true});
|
|
window.addEventListener('resize', onResize, false);
|
|
|
|
update();
|
|
|
|
});
|
|
</script>
|
|
|
|
<script
|
|
src="https://embedd.io/embedd.min.js"
|
|
type="5488e350327db868bae35380-text/javascript"
|
|
></script>
|
|
<a rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/"
|
|
><img
|
|
alt="Creative Commons License"
|
|
style="border-width: 0"
|
|
src="https://i.creativecommons.org/l/by-sa/4.0/88x31.png" /></a
|
|
><br />This work is licensed under a
|
|
<a rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/"
|
|
>Creative Commons Attribution-ShareAlike 4.0 International License</a
|
|
>.
|
|
<script
|
|
src="https://ajax.cloudflare.com/cdn-cgi/scripts/95c75768/cloudflare-static/rocket-loader.min.js"
|
|
data-cf-settings="5488e350327db868bae35380-|49"
|
|
defer
|
|
></script>
|
|
</body>
|
|
</html>
|