Skip to content
This repository has been archived by the owner on May 24, 2023. It is now read-only.

Commit

Permalink
Auto format (#11)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
agam778 and github-actions[bot] committed Mar 11, 2022
1 parent 5b46f29 commit 0b48056
Show file tree
Hide file tree
Showing 122 changed files with 3,778 additions and 3,776 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,33 +8,33 @@ jobs:
format:
runs-on: ubuntu-latest
steps:
- name: "Checkout Repository"
- name: 'Checkout Repository'
uses: actions/checkout@v2

- name: "Setup Node.js"
- name: 'Setup Node.js'
uses: actions/setup-node@v1
with:
node-version: "16.x"
node-version: '16.x'

- name: "Install Dependencies"
run: "corepack enable; yarn; yarn install"
- name: 'Install Dependencies'
run: 'corepack enable; yarn; yarn install'

- name: "Format Code"
run: "yarn format"
- name: 'Format Code'
run: 'yarn format'

- name: Create pull request
uses: peter-evans/[email protected]
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
with:
token: ${{ secrets.WORKFLOW_TOKEN }}
commit-message: "style: auto format"
committer: "github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>"
author: "github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>"
commit-message: 'style: auto format'
committer: 'github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>'
author: 'github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>'

title: Format Code
body: |
This PR was created by the `format` workflow.
It has formatted the code using the `yarn format` command.
Please review the changes and merge the PR if everything looks good.
labels: "format"
labels: 'format'
16 changes: 8 additions & 8 deletions .github/workflows/yarn_bump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@ name: Bump Yarn Dependencies

on:
schedule:
- cron: "0 9 * * *"
- cron: '0 9 * * *'
workflow_dispatch:

jobs:
yarn_bump:
runs-on: ubuntu-latest
steps:
- name: "Checkout Repository"
- name: 'Checkout Repository'
uses: actions/checkout@v2

- name: "Setup nodejs"
- name: 'Setup nodejs'
uses: actions/setup-node@v1
with:
node-version: "16.x"
node-version: '16.x'

- name: "Enable Yarn"
run: "corepack enable"
- name: 'Enable Yarn'
run: 'corepack enable'

- name: "Update Yarn Dependencies"
- name: 'Update Yarn Dependencies'
run: "yarn up '*'"

- name: Create pull request
Expand All @@ -34,4 +34,4 @@ jobs:
This PR was created by the yarn_bump workflow.
It has updated all dependencies using yarn up '*' command.
Please review the changes and merge the PR if everything looks good.
labels: "dependencies"
labels: 'dependencies'
8 changes: 4 additions & 4 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"trailingComma": "all",
"semi": false,
"singleQuote": true
}
"trailingComma": "all",
"semi": false,
"singleQuote": true
}
54 changes: 27 additions & 27 deletions commands/Activities/awkword.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
const { MessageEmbed } = require("discord.js");
const ee = require("../../botconfig/embed.json");
const { MessageEmbed } = require('discord.js')
const ee = require('../../botconfig/embed.json')

module.exports = {
name: "awkword",
category: "Activities",
name: 'awkword',
category: 'Activities',
aliases: [],
cooldown: "",
usage: "awkword",
cooldown: '',
usage: 'awkword',
description: 'Play "Awkword" together with your friends on Discord!',
memberpermissions: [],
requiredroles: [],
Expand All @@ -15,44 +15,44 @@ module.exports = {
maxargs: 0,
minplusargs: 0,
maxplusargs: 0,
argsmissing_message: "",
argstoomany_message: "",
argsmissing_message: '',
argstoomany_message: '',
run: async (client, message, args, plusArgs, cmdUser, text, prefix) => {
const channel = message.member.voice.channel;
const channel = message.member.voice.channel
if (!channel)
return message.channel.send(
"You must join a voice channel to play Awkword!"
);
'You must join a voice channel to play Awkword!',
)

if (!channel.permissionsFor(message.client.user).has("CONNECT"))
if (!channel.permissionsFor(message.client.user).has('CONNECT'))
return message.channel.send(
"I don't have permission to join the voice channel"
);
"I don't have permission to join the voice channel",
)

if (!channel.permissionsFor(message.client.user).has("SPEAK"))
if (!channel.permissionsFor(message.client.user).has('SPEAK'))
return message.channel.send(
"I don't have permission to speak in the voice channel"
);
"I don't have permission to speak in the voice channel",
)

const msg = await message.channel.send("Please Wait...");
const msg = await message.channel.send('Please Wait...')
client.discordTogether
.createTogetherCode(channel.id, "awkword")
.createTogetherCode(channel.id, 'awkword')
.then(async (invite) => {
msg.delete();
msg.delete()
return message.reply({
embeds: [
new MessageEmbed()
.setColor("RED")
.setTitle("Awkword!")
.setColor('RED')
.setTitle('Awkword!')
.setDescription(
`[Click Here to start the activity!](${invite.code})`
`[Click Here to start the activity!](${invite.code})`,
)
.setThumbnail(
"https://www.graphicsprings.com/filestorage/stencils/084a905bb0bb38fedf776f5f0c5f66b8.png"
'https://www.graphicsprings.com/filestorage/stencils/084a905bb0bb38fedf776f5f0c5f66b8.png',
)
.setFooter({ text: ee.footertext, iconURL: ee.footericon }),
],
});
});
})
})
},
};
}
56 changes: 28 additions & 28 deletions commands/Activities/betrayal.js
Original file line number Diff line number Diff line change
@@ -1,58 +1,58 @@
const { MessageEmbed } = require("discord.js");
const ee = require("../../botconfig/embed.json");
const { MessageEmbed } = require('discord.js')
const ee = require('../../botconfig/embed.json')

module.exports = {
name: "betrayal",
category: "Activities",
name: 'betrayal',
category: 'Activities',
aliases: [],
cooldown: "",
usage: "betrayal",
description: "Play betrayal with your friends on Discord!",
cooldown: '',
usage: 'betrayal',
description: 'Play betrayal with your friends on Discord!',
memberpermissions: [],
requiredroles: [],
alloweduserids: [],
minargs: 0,
maxargs: 0,
minplusargs: 0,
maxplusargs: 0,
argsmissing_message: "",
argstoomany_message: "",
argsmissing_message: '',
argstoomany_message: '',
run: async (client, message, args, plusArgs, cmdUser, text, prefix) => {
const channel = message.member.voice.channel;
const channel = message.member.voice.channel
if (!channel)
return message.channel.send(
"You must join a voice channel to join activity!"
);
'You must join a voice channel to join activity!',
)

if (!channel.permissionsFor(message.client.user).has("CONNECT"))
if (!channel.permissionsFor(message.client.user).has('CONNECT'))
return message.channel.send(
"I don't have permission to join the voice channel"
);
"I don't have permission to join the voice channel",
)

if (!channel.permissionsFor(message.client.user).has("SPEAK"))
if (!channel.permissionsFor(message.client.user).has('SPEAK'))
return message.channel.send(
"I don't have permission to speak in the voice channel"
);
"I don't have permission to speak in the voice channel",
)

const msg = await message.reply("Please Wait...");
const msg = await message.reply('Please Wait...')
client.discordTogether
.createTogetherCode(channel.id, "betrayal")
.createTogetherCode(channel.id, 'betrayal')
.then(async (invite) => {
msg.delete();
msg.delete()
return message.reply({
embeds: [
new MessageEmbed()
.setColor("RED")
.setTitle("Betrayal!")
.setColor('RED')
.setTitle('Betrayal!')
.setDescription(
`[Click Here to start the activity!](${invite.code})`
`[Click Here to start the activity!](${invite.code})`,
)
.setThumbnail(
"https://images.crazygames.com/games/betrayal-io/cover-1615286192675.png"
'https://images.crazygames.com/games/betrayal-io/cover-1615286192675.png',
)
.setFooter({ text: ee.footertext, iconURL: ee.footericon }),
],
});
});
})
})
},
};
}
56 changes: 28 additions & 28 deletions commands/Activities/checkers.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
const { MessageEmbed } = require("discord.js");
const ee = require("../../botconfig/embed.json");
const { MessageEmbed } = require('discord.js')
const ee = require('../../botconfig/embed.json')

module.exports = {
name: "checkers",
category: "Activities",
aliases: ["checkersinthepark"],
cooldown: "",
usage: "checkers",
name: 'checkers',
category: 'Activities',
aliases: ['checkersinthepark'],
cooldown: '',
usage: 'checkers',
description:
'Play "Checkers together in the park" together with your friends on Discord!',
memberpermissions: [],
Expand All @@ -16,44 +16,44 @@ module.exports = {
maxargs: 0,
minplusargs: 0,
maxplusargs: 0,
argsmissing_message: "",
argstoomany_message: "",
argsmissing_message: '',
argstoomany_message: '',
run: async (client, message, args, plusArgs, cmdUser, text, prefix) => {
const channel = message.member.voice.channel;
const channel = message.member.voice.channel
if (!channel)
return message.channel.send(
'You must join a voice channel to play "Checkers in the park"!'
);
'You must join a voice channel to play "Checkers in the park"!',
)

if (!channel.permissionsFor(message.client.user).has("CONNECT"))
if (!channel.permissionsFor(message.client.user).has('CONNECT'))
return message.channel.send(
"I don't have permission to join the voice channel"
);
"I don't have permission to join the voice channel",
)

if (!channel.permissionsFor(message.client.user).has("SPEAK"))
if (!channel.permissionsFor(message.client.user).has('SPEAK'))
return message.channel.send(
"I don't have permission to speak in the voice channel"
);
"I don't have permission to speak in the voice channel",
)

const msg = await message.channel.send("Please Wait...");
const msg = await message.channel.send('Please Wait...')
client.discordTogether
.createTogetherCode(channel.id, "checkers")
.createTogetherCode(channel.id, 'checkers')
.then(async (invite) => {
msg.delete();
msg.delete()
return message.reply({
embeds: [
new MessageEmbed()
.setColor("RED")
.setTitle("Checkers in the Park!")
.setColor('RED')
.setTitle('Checkers in the Park!')
.setDescription(
`[Click Here to start the activity!](${invite.code})`
`[Click Here to start the activity!](${invite.code})`,
)
.setThumbnail(
"https://images.chesscomfiles.com/uploads/v1/images_users/tiny_mce/SamCopeland/phpmeXx6V.png"
'https://images.chesscomfiles.com/uploads/v1/images_users/tiny_mce/SamCopeland/phpmeXx6V.png',
)
.setFooter({ text: ee.footertext, iconURL: ee.footericon }),
],
});
});
})
})
},
};
}
Loading

0 comments on commit 0b48056

Please sign in to comment.