diff --git a/.github/workflows/typo-check.yml b/.github/workflows/typo-check.yml new file mode 100644 index 00000000..68a51b36 --- /dev/null +++ b/.github/workflows/typo-check.yml @@ -0,0 +1,32 @@ +name: Typo Check + +on: + pull_request: + branches: + - master + - main + push: + branches: + - master + - main + +jobs: + typo-check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.x" + + - name: Install codespell + run: pip install codespell + + - name: Run codespell + run: | + codespell \ + --skip=".git,*.svg,*.css,*.js" \ + --ignore-words-list="crate,ect,requestor,stanger,intrest" \ + docs/ src/ *.md *.yml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 00000000..29ea095b --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,10 @@ +repos: + - repo: https://github.com/codespell-project/codespell + rev: v2.2.6 + hooks: + - id: codespell + name: Check for typos + args: + - --skip=.git,*.svg,*.css,*.js + - --ignore-words-list=crate,ect,requestor,stanger,intrest + types_or: [markdown, yaml, python, html] diff --git a/docs/api/account/index.md b/docs/api/account/index.md index 1f3f045b..17fbebfb 100644 --- a/docs/api/account/index.md +++ b/docs/api/account/index.md @@ -30,7 +30,7 @@ If the request succeeds, `meta.errors` will be null, and if the request fails, ` *** > [!note] -> Calls related to account security, such as managing your password or updating MFA settings are located in the [Oauth / MFA Managment](oauth.md) section. +> Calls related to account security, such as managing your password or updating MFA settings are located in the [Oauth / MFA Management](oauth.md) section. ## About @@ -112,7 +112,7 @@ POST /users/update * *avatar_url* - string — A valid image URL proccesed by GroupMe's [image service](https://dev.groupme.com/docs/image_service) + string — A valid image URL processed by GroupMe's [image service](https://dev.groupme.com/docs/image_service) * *name* @@ -272,7 +272,7 @@ Status: 200 OK ## Update Major Tags -This call is only allowed for accounts that are members of a school domain, which is not an easy proccess to automate and thus will not be fully documented. HOWEVER, once you are in a domain, you have a few additional calls availible for your account. +This call is only allowed for accounts that are members of a school domain, which is not an easy process to automate and thus will not be fully documented. HOWEVER, once you are in a domain, you have a few additional calls available for your account. ```json linenums="1" title="HTTP Request" PUT /directories/user/majors @@ -302,7 +302,7 @@ Status: 201 Accepted ## Set Graduation Year and Domain Visibility -This call is only allowed for accounts that are members of a school domain, which is not an easy proccess to automate and thus will not be fully documented. HOWEVER, once you are in a domain, you have a few additional calls availible for your account. +This call is only allowed for accounts that are members of a school domain, which is not an easy process to automate and thus will not be fully documented. HOWEVER, once you are in a domain, you have a few additional calls available for your account. This call specifies your graduation year tag inside of your profile as well as what level of visibility you want your profile to be at within the campus domain. @@ -372,7 +372,7 @@ Status: 200 OK ## Enable SMS mode -Enables SMS mode for N hours, where N is at most 48. After N hours have elapsed, user will receive push notfications. +Enables SMS mode for N hours, where N is at most 48. After N hours have elapsed, user will receive push notifications. ```json linenums="1" title="HTTP Request" POST /users/sms_mode diff --git a/docs/api/account/oauth.md b/docs/api/account/oauth.md index 820ce3bb..2547bb23 100644 --- a/docs/api/account/oauth.md +++ b/docs/api/account/oauth.md @@ -209,7 +209,7 @@ Your client follows one of a few methods to verify that MFA ID, and then passes Because sending a text is asynchronous, you need to wait and validate that the server has received your SMS before attempting to use the MFA ID. You can do this via polling the ID to see if it's validated yet. - You can use this call to check if any MFA ID is valid, not just ones where you're sending the text. It's most relevant here, so thats why we include it. + You can use this call to check if any MFA ID is valid, not just ones where you're sending the text. It's most relevant here, so that's why we include it. ```json linenums="1" title="HTTP Request" GET /verifications/:mfa_id @@ -286,10 +286,10 @@ This call activates an MFA channel for your account, it works just like logging You make this call once without an MFA verification object, receive an MFA ID for the interaction, validate it using the steps detailed in the [Handling MFA Challenges](#handling-mfa-challenges) section, then make this call a second time including the now verified MFA ID. -After establishing the MFA channel you must enable it with a seperate call. +After establishing the MFA channel you must enable it with a separate call. > [!important] -> Activating MFA will log you out *everywhere*, including 3rd party Oauth apps. This proccess will invalidate your current API token and return a new one that you should use to make subsequent API calls. +> Activating MFA will log you out *everywhere*, including 3rd party Oauth apps. This process will invalidate your current API token and return a new one that you should use to make subsequent API calls. ```json linenums="1" title="HTTP Request" POST /user/mfa @@ -311,9 +311,9 @@ POST /user/mfa * *code* - string - A verified MFA ID obtained by completing the verification challenge. This only needs to be inlcuded on the second request you make to this endpoint. + string - A verified MFA ID obtained by completing the verification challenge. This only needs to be included on the second request you make to this endpoint. -On the first call you make, whithout sending a verification code, the response should look like this: +On the first call you make, without sending a verification code, the response should look like this: ```json linenums="1" title="HTTP Response" Status: 202 Accepted diff --git a/docs/api/bots/index.md b/docs/api/bots/index.md index 16aa82c8..7ca30542 100644 --- a/docs/api/bots/index.md +++ b/docs/api/bots/index.md @@ -83,7 +83,7 @@ POST /bots * *avatar_url* - string - a URL to an image which will be the bot's avatar. This image MUST be proccessed by GroupMe's [Image Service](../uploads/images.md) before it can be sent. + string - a URL to an image which will be the bot's avatar. This image MUST be processed by GroupMe's [Image Service](../uploads/images.md) before it can be sent. * *callback_url* diff --git a/docs/api/common/attachments.md b/docs/api/common/attachments.md index ac38f2d9..541099ff 100644 --- a/docs/api/common/attachments.md +++ b/docs/api/common/attachments.md @@ -264,7 +264,7 @@ Read more about calendar events [here](../conversations/calendar.md) * *type* - string - must be "event" for a callendar event attachment + string - must be "event" for a calendar event attachment * *event_id* @@ -309,7 +309,7 @@ This attachment type is read-only and used exclusively by Copilot in its message ## Partial Image -This attachment type is read-only and used exclusively by Copilot in its messages to attach partial images as they are being generated. Copilot will edit its messages containing in-progress images as they finish. When an image is complete, its partial image attachement is swapped for a regular image attachment containing a CDN URL. +This attachment type is read-only and used exclusively by Copilot in its messages to attach partial images as they are being generated. Copilot will edit its messages containing in-progress images as they finish. When an image is complete, its partial image attachment is swapped for a regular image attachment containing a CDN URL. ```json linenums="1" title="Object Structure" { diff --git a/docs/api/conversations/calendar.md b/docs/api/conversations/calendar.md index 01a9a936..2342145e 100644 --- a/docs/api/conversations/calendar.md +++ b/docs/api/conversations/calendar.md @@ -1,6 +1,6 @@ --- -title: "Calandar Events" -description: "Learn how to interact with GroupMe's Calandar Events via the API." +title: "Calendar Events" +description: "Learn how to interact with GroupMe's Calendar Events via the API." --- # Calendar Events diff --git a/docs/api/conversations/pins.md b/docs/api/conversations/pins.md index 6466d04e..cb835caf 100644 --- a/docs/api/conversations/pins.md +++ b/docs/api/conversations/pins.md @@ -33,7 +33,7 @@ If the request succeeds, `meta.errors` will be null, and if the request fails, ` Pins a message. -Note that trying to pin a message which is already pinned will result in an unhelpful 400 error. It may be difficult to programatically determine whether a given call fails due to an actual bad request, or if it's just because the message has already been pinned. For now, you just have to enumerate the pinned mesages and see if there's a match, or get the messatge object and see if the "pinned_at" field is null +Note that trying to pin a message which is already pinned will result in an unhelpful 400 error. It may be difficult to programmatically determine whether a given call fails due to an actual bad request, or if it's just because the message has already been pinned. For now, you just have to enumerate the pinned messages and see if there's a match, or get the messatge object and see if the "pinned_at" field is null ```json linenums="1" title="HTTP Request" POST /conversations/:conversation_id/messages/:message_id/pin diff --git a/docs/api/dms/index.md b/docs/api/dms/index.md index 3d1bccf9..2e8edeff 100644 --- a/docs/api/dms/index.md +++ b/docs/api/dms/index.md @@ -97,7 +97,7 @@ GET /chats/:chat_id * *chat_id* - string - this is the compound ID of the chat, consisting of two seperate user IDs. It should look something like `93645911+118825642`. + string - this is the compound ID of the chat, consisting of two separate user IDs. It should look something like `93645911+118825642`. ```json linenums="1" title="HTTP Response" Status: 200 OK @@ -151,7 +151,7 @@ DELETE /chats/:chat_id * *chat_id* - string - this is the compound ID of the chat, consisting of two seperate user IDs. It should look something like `93645911+118825642`. + string - this is the compound ID of the chat, consisting of two separate user IDs. It should look something like `93645911+118825642`. ```json linenums="1" title="HTTP Response" Status: 200 OK diff --git a/docs/api/groups/campus.md b/docs/api/groups/campus.md index 05efba21..9b549108 100644 --- a/docs/api/groups/campus.md +++ b/docs/api/groups/campus.md @@ -109,7 +109,7 @@ Status: 200 OK ## Index Members -Return a list containing all of the users who are visible to you within the campus directory. Note that the responses you get are also dependant on the privacy status of other users in the directory. Some people have their profiles set to be visible to only their major or graduation year, or hidden entirely. +Return a list containing all of the users who are visible to you within the campus directory. Note that the responses you get are also dependent on the privacy status of other users in the directory. Some people have their profiles set to be visible to only their major or graduation year, or hidden entirely. > [!important] > This request is relative to `https://api.groupme.com/v1/`, not `https://api.groupme.com/v3/`. diff --git a/docs/api/groups/directories.md b/docs/api/groups/directories.md index b4ba9ce1..bfe427bb 100644 --- a/docs/api/groups/directories.md +++ b/docs/api/groups/directories.md @@ -142,7 +142,7 @@ Status: 201 Created ## Search Public Groups -Returns a list of public groups based on search terms or lattitude/longitude coordinates. If a location is supplied, groups will be orderd roughly by distance from that point. +Returns a list of public groups based on search terms or latitude/longitude coordinates. If a location is supplied, groups will be ordered roughly by distance from that point. Returned groups will be split into 4 different lists, depending on where they were found. * `directories` if you're a member of a university campus directory and matching results were found in your school domain @@ -171,9 +171,9 @@ GET https://api.groupme.com/v1/search String - A set of search terms to filter groups in the response. -* *lattitude* +* *latitude* - Decimal - The lattitude coordinate for a point used to sort groups by their distance. + Decimal - The latitude coordinate for a point used to sort groups by their distance. * *longitude* diff --git a/docs/api/groups/index.md b/docs/api/groups/index.md index d045029c..8beb31fa 100644 --- a/docs/api/groups/index.md +++ b/docs/api/groups/index.md @@ -443,7 +443,7 @@ POST /groups/:id/update * *show_join_question* - boolean - If true, members must answer a question prompt in oder to request to join a group. The question defaults to "Why do you want to join this group". `"requires_approval"` must be true for this value to take effect. + boolean - If true, members must answer a question prompt in order to request to join a group. The question defaults to "Why do you want to join this group". `"requires_approval"` must be true for this value to take effect. * *join_question* object - Has two properties, `"type"` must always be set to `"join_reason/questions/text"` , and `"text"` is the custom join question. Both `"requires_approval"` and `"show_join_question"` must be true for this value to take effect. diff --git a/docs/api/index.md b/docs/api/index.md index f1ee315e..79ebd151 100644 --- a/docs/api/index.md +++ b/docs/api/index.md @@ -35,7 +35,7 @@ If you have any questions or would like to get in touch, please join the [GroupM [Direct Messages]: dms/index.md [Conversation Management]: conversations/index.md [Common API Structures]: common/index.md - [CDN Management]: uploads/indexs.md + [CDN Management]: uploads/index.md *** diff --git a/docs/api/uploads/images.md b/docs/api/uploads/images.md index d50da919..3406a794 100644 --- a/docs/api/uploads/images.md +++ b/docs/api/uploads/images.md @@ -82,7 +82,7 @@ You must to provide the **X-Access-Token** user API token as a header. **Response** Your response will be of the same format as above: -```json linenums="1" titile="HTTP Response" +```json linenums="1" title="HTTP Response" Status: 200 OK { "payload": { diff --git a/docs/api/ws/messageTypes.md b/docs/api/ws/messageTypes.md index cab6dee6..170d00e5 100644 --- a/docs/api/ws/messageTypes.md +++ b/docs/api/ws/messageTypes.md @@ -28,7 +28,7 @@ The following sections describe the different message types you may receive, alo ## `ping` -A keep-alive heartbeat message. This message is sent down every 30 seconds in order to ensure your client is still listening. You can generally ignore these messages if you dont plan on sending them, as the server will keep the connection alive on its own. Sending a `ping` type message causes the server to echo one back and then supresses the server from sending pings for the next 30 seconds. By timing how long it takes to send this message and then receive an echoed ping from the server you can effectively calculate roundtrip ping latancy for the WebSocket gateway. +A keep-alive heartbeat message. This message is sent down every 30 seconds in order to ensure your client is still listening. You can generally ignore these messages if you dont plan on sending them, as the server will keep the connection alive on its own. Sending a `ping` type message causes the server to echo one back and then suppresses the server from sending pings for the next 30 seconds. By timing how long it takes to send this message and then receive an echoed ping from the server you can effectively calculate roundtrip ping latancy for the WebSocket gateway. This and [`typing`](#typing) are the only two message types clients are permitted by the API to send. @@ -94,7 +94,7 @@ Generally, incoming messages will look like this: * *subject* - object - The message object this push is refering to. + object - The message object this push is referring to. * *received_at* @@ -155,7 +155,7 @@ However, in some cases you may observe a system message with an attached `subjec * *subject* - object - The message object this push is refering to. + object - The message object this push is referring to. * *received_at* @@ -208,7 +208,7 @@ Generally, incoming messages will look like this: * *subject* - object - The message object this push is refering to. + object - The message object this push is referring to. * *received_at* @@ -264,7 +264,7 @@ However, in some cases you may observe a system message with an attached `subjec * *subject* - object - The message object this push is refering to. + object - The message object this push is referring to. * *received_at* diff --git a/docs/contributing/index.md b/docs/contributing/index.md index c2565b2c..3dc43fd9 100644 --- a/docs/contributing/index.md +++ b/docs/contributing/index.md @@ -77,6 +77,49 @@ Make sure to follow the existing style and structure of the documentation. This We use a special flavor of Markdown that supports additional features like admonitions and special UI elements. You can dind its reference in the [Material for MKDocs Reference Guide](https://squidfunk.github.io/mkdocs-material/reference/) +``` + + +#### Linting and Typo Checking + +This project uses [codespell](https://github.com/codespell-project/codespell) to catch common typos before they make it into the documentation. We recommend setting up [pre-commit](https://pre-commit.com/) to automatically check for typos before each commit. + +**Installing pre-commit:** + +```bash +pip install pre-commit +pre-commit install +``` + +After running these commands, codespell will automatically check your changes for typos every time you commit. If typos are found, the commit will be blocked until you fix them. + +**Fixing typos:** + +If codespell finds a typo, it will show you the file, line number, and suggest corrections: + +``` +docs/api/groups/index.md:123: receive ==> receive +``` + +Simply open the file, navigate to the line, and fix the typo. Then stage your changes and commit again. + +**Running the check manually:** + +You can also run the typo check manually at any time: + +```bash +pre-commit run --all-files +``` + +Or run codespell directly: + +```bash +pip install codespell +codespell docs/ +``` + +If codespell flags a word that is intentionally spelled that way (like a technical term or API field name), you can add it to the ignore list in `.pre-commit-config.yaml`. + *** ### Step 5: Commit Your Changes diff --git a/docs/examples/dinobot.md b/docs/examples/dinobot.md index d7bb2376..5899fd23 100644 --- a/docs/examples/dinobot.md +++ b/docs/examples/dinobot.md @@ -6,7 +6,7 @@ DinoBot is a simple webhook bot for GroupMe, originally written in C# by Microso Before you can run DinoBot, you need to set up a GroupMe bot and a callback URL that points to your server/host where the bot will receive and handle messages. The easisest way to create a bot is to use [GroupMe's Bot Creation form](https://dev.groupme.com/bots/new), where you can specify the bot's name, avatar, and callback URL. Alternatively, you can create a bot using the API and your user account's API token. Read more about creating and managing bots in the [Bots API Reference](../api/bots/index.md). -After registering a new bot with GroupMe, create a new Node.js project and install express.js (An HTTP server framework for JavaScript we will use to catch GroupMe's POST messags to our callback URL). +After registering a new bot with GroupMe, create a new Node.js project and install express.js (An HTTP server framework for JavaScript we will use to catch GroupMe's POST messages to our callback URL). You can do this by running the following commands in your terminal: @@ -19,7 +19,7 @@ npm install express This is the main script for DinoBot, which listens for messages in a GroupMe group and responds with dinosaur emojis based on certain triggers. The bot can respond to requests for dinos, mentions of its name, or random questions. -You can save this code in a file named `DinoBot.js`, and run it using Node.js with this commmand: +You can save this code in a file named `DinoBot.js`, and run it using Node.js with this command: ```bash node DinoBot.js diff --git a/docs/examples/pingpong.md b/docs/examples/pingpong.md index 05ee4564..98de9e27 100644 --- a/docs/examples/pingpong.md +++ b/docs/examples/pingpong.md @@ -31,7 +31,7 @@ Replies have a unique identifier called `base_reply_id`, which is the ID of the The `mention` attachment allows you to mention a user in your bot's response. This is useful for drawing attention to the user who sent the original message. The `user_ids` array should contain the ID of the user you want to mention, and the `loci` array specifies the range of text that will be highlighted as a mention, where the first number is the start index and the second number is the length of the mention text. -For more information on how to use message attachements, see the [Attachments](../common/index.md#attachments) documentation. +For more information on how to use message attachments, see the [Attachments](../common/index.md#attachments) documentation. ## PingPong Bot Script diff --git a/mkdocs.yml b/mkdocs.yml index 11367647..2510c0d7 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -153,7 +153,7 @@ nav: - Conversation Features: - api/conversations/index.md - Emoji Reactions: api/conversations/reactions.md - - Calandar Events: api/conversations/calendar.md + - Calendar Events: api/conversations/calendar.md - Image Galleries: api/conversations/gallery.md - Pinning Messages: api/conversations/pins.md - Common Structures: