<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Golang on Wayne X.Y. Blog</title>
    <link>/en/tags/golang/</link>
    <description>Recent content in Golang on Wayne X.Y. Blog</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Wed, 11 Feb 2026 00:00:00 +0000</lastBuildDate>
    <atom:link href="/en/tags/golang/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Building a Discord AI Chatbot with Golang &#43; Google Gemini API</title>
      <link>/en/2026/02/11/discord-chatbot-gemini/</link>
      <pubDate>Wed, 11 Feb 2026 00:00:00 +0000</pubDate>
      <guid>/en/2026/02/11/discord-chatbot-gemini/</guid>
      <description>&lt;h1 id=&#34;building-a-discord-ai-chatbot-with-golang--google-gemini-api&#34;&gt;Building a Discord AI Chatbot with Golang + Google Gemini API&lt;/h1&gt;&#xA;&lt;p&gt;In this article, we will use &lt;strong&gt;Golang&lt;/strong&gt; combined with the &lt;strong&gt;Google Gemini API&lt;/strong&gt; to implement a Discord chatbot.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;-prerequisites&#34;&gt;🛠️ Prerequisites&lt;/h2&gt;&#xA;&lt;p&gt;Before we start, please ensure you have the following development environment and API keys ready:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;strong&gt;Golang Environment&lt;/strong&gt;: Install Go 1.25 or a later version.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Discord Bot Token&lt;/strong&gt;:&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Go to the &lt;a href=&#34;https://discord.com/developers/applications&#34;&gt;Discord Developer Portal&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;li&gt;Create a new Application and add a Bot.&lt;/li&gt;&#xA;&lt;li&gt;Get the Bot Token (keep it safe, do not leak it).&#xA;&#xA;  &lt;img src=&#34;https://static.wayne-xy.com/02-11-post/discord-chatbot-token.png&#34; alt=&#34;&#34;&gt;&#xA;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Enable &lt;code&gt;Message Content Intent&lt;/code&gt; permission so the bot can read user messages.&#xA;&#xA;  &lt;img src=&#34;https://static.wayne-xy.com/02-11-post/discord-chatbot-message.png&#34; alt=&#34;&#34;&gt;&#xA;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Invite the bot to your Discord server via OAuth2.&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Select scopes&#xA;&#xA;  &lt;img src=&#34;https://static.wayne-xy.com/02-11-post/discord-chatbot-OAuth2-scope.png&#34; alt=&#34;&#34;&gt;&#xA;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Select permissions&#xA;&#xA;  &lt;img src=&#34;https://static.wayne-xy.com/02-11-post/discord-chatbot-OAuth2-permission.png&#34; alt=&#34;&#34;&gt;&#xA;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Generate URL and invite the bot&#xA;&#xA;  &lt;img src=&#34;https://static.wayne-xy.com/02-11-post/discord-chatbot-OAuth2-url.png&#34; alt=&#34;&#34;&gt;&#xA;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;⚠️ Note: The bot will be offline at this stage.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
