mirror of
https://github.com/alterware/aw-bot.git
synced 2026-10-23 19:08:12 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d46bf422b5 | ||
|
|
ba1057ec31
|
||
|
|
765bc1475a | ||
|
|
ca4b67f18d | ||
|
|
8f9a57d52c | ||
|
|
270d6aa9b1 | ||
|
|
fc0fee1a9a | ||
|
|
f507d908a3 | ||
|
|
da5aecc342
|
||
|
|
6565993e7f
|
||
|
|
6586d899cc
|
||
|
|
ccc6b0bc6f | ||
|
|
eb248fd63d | ||
|
|
ea8cff85ed | ||
|
|
38c6862d35 |
No files matched your search
@@ -19,19 +19,19 @@ jobs:
|
||||
lfs: true
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v4.1.0
|
||||
uses: docker/setup-qemu-action@v4.2.0
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v4.1.0
|
||||
uses: docker/setup-buildx-action@v4.3.0
|
||||
|
||||
- name: Log in to DockerHub
|
||||
uses: docker/login-action@v4.2.0
|
||||
uses: docker/login-action@v4.6.0
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USER }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- id: meta
|
||||
uses: docker/metadata-action@v6.1.0
|
||||
uses: docker/metadata-action@v6.2.0
|
||||
with:
|
||||
images: |
|
||||
alterware/aw-bot
|
||||
@@ -41,7 +41,7 @@ jobs:
|
||||
|
||||
- name: Build and push Docker image
|
||||
id: build-and-push
|
||||
uses: docker/build-push-action@v7.2.0
|
||||
uses: docker/build-push-action@v7.3.0
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64,linux/arm64
|
||||
|
||||
@@ -5,3 +5,11 @@ Contributions are welcome! Please follow the guidelines below:
|
||||
|
||||
- Sign [AlterWare CLA](https://alterware.dev/cla) and send a pull request or email your patch at patches@alterware.dev
|
||||
- Make sure that PRs have only one commit, and deal with one issue only
|
||||
|
||||
## Discord gateway intents
|
||||
|
||||
The bot explicitly enables only the gateway intents it uses: guilds, members,
|
||||
guild and DM messages, message content, guild reactions, and voice states.
|
||||
Enable the **Server Members Intent** and **Message Content Intent** under
|
||||
**Developer Portal > Application > Bot > Privileged Gateway Intents**. The
|
||||
other enabled intents are not privileged.
|
||||
@@ -12,7 +12,14 @@ BOT_LOG = 1112049391482703873
|
||||
GENERAL_CHANNEL = 1110531063744303138
|
||||
OFFTOPIC_CHANNEL = 1112048063448617142
|
||||
|
||||
intents = discord.Intents.all()
|
||||
intents = discord.Intents.none()
|
||||
intents.guilds = True
|
||||
intents.members = True
|
||||
intents.guild_messages = True
|
||||
intents.dm_messages = True
|
||||
intents.message_content = True
|
||||
intents.guild_reactions = True
|
||||
intents.voice_states = True
|
||||
bot = commands.Bot(command_prefix="!", intents=intents)
|
||||
|
||||
# Load environment variables from .env file (if it exists)
|
||||
|
||||
@@ -25,9 +25,15 @@ SPAM_ROLE_ID = 1350511935677927514
|
||||
ADMIN_ROLE_ID = 1112364483915042908
|
||||
GROK_ROLE_ID = 1362837967919386916
|
||||
|
||||
MW2_CHANNEL = 1145458108190163014
|
||||
MW3_CHANNEL = 1145459504436220014
|
||||
GHOST_CHANNEL_ID = 1145469106133401682
|
||||
AW_CHANNEL_ID = 1145469136919613551
|
||||
DEPRECATED_SUPPORT_CHANNELS = [GHOST_CHANNEL_ID, AW_CHANNEL_ID]
|
||||
DEPRECATED_SUPPORT_CHANNELS = [
|
||||
AW_CHANNEL_ID,
|
||||
MW2_CHANNEL,
|
||||
MW3_CHANNEL,
|
||||
]
|
||||
deprecated_support_last_response_time = None
|
||||
|
||||
ALLOWED_CHANNELS = [
|
||||
@@ -35,7 +41,7 @@ ALLOWED_CHANNELS = [
|
||||
1119371841711112314, # vip-channel
|
||||
1382808781032914975, # launcher-support
|
||||
1180796301953212537, # bo3-support
|
||||
1145459504436220014, # mw3-support
|
||||
MW3_CHANNEL, # mw3-support
|
||||
]
|
||||
|
||||
# Discord embed limits
|
||||
@@ -110,7 +116,7 @@ async def handle_deprecated_support_channel(message):
|
||||
now = aware_utcnow()
|
||||
if (
|
||||
deprecated_support_last_response_time is None
|
||||
or now - deprecated_support_last_response_time >= timedelta(minutes=10)
|
||||
or now - deprecated_support_last_response_time >= timedelta(minutes=180)
|
||||
):
|
||||
deprecated_support_last_response_time = now
|
||||
await message.reply(
|
||||
|
||||
@@ -16,8 +16,6 @@ OFFTOPIC_CHANNEL = 1112048063448617142
|
||||
SPAM_ROLE_ID = 1350511935677927514
|
||||
|
||||
COD_GAMES = {
|
||||
10180: {"name": "Modern Warfare 2 (2009)", "channel": 1145458108190163014},
|
||||
42680: {"name": "Modern Warfare 3 (2011)", "channel": 1145459504436220014},
|
||||
311210: {"name": "Call of Duty: Black Ops 3", "channel": 1180796251529293844},
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user