Skip to content

Commit

Permalink
Rename permission
Browse files Browse the repository at this point in the history
  • Loading branch information
jaimeadf committed Oct 19, 2020
1 parent aee8efc commit 2d911e9
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ A `/screenshot` command is created according to the framework you are using.
### Standalone

#### /screenshot <player or identifier>
Can be used via console or by anyone with the `screenshot.command` ace permission.
Can be used via console or by anyone with the `command.screenshot` ace permission.

### vRP

#### /screenshot <user_id>
Can be used via console or by anyone with the `screenshot.command` permission.
Can be used via console or by anyone with the `command.screenshot` permission.

## API

Expand Down
4 changes: 2 additions & 2 deletions README.pt.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ Um comando `/screenshot` é criado de acordo com a framework que você está uti
### Standalone

#### /screenshot <player ou identificador>
Pode ser usado via console ou por qualquer um com a permissão ace `screenshot.command`.
Pode ser usado via console ou por qualquer um com a permissão ace `command.screenshot`.

### vRP

#### /screenshot <user_id>
Pode ser usado via console ou por qualquer um com a permissão `screenshot.command`.
Pode ser usado via console ou por qualquer um com a permissão `command.screenshot`.

## API

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "discord-screenshot",
"version": "1.1.3",
"version": "1.1.4",
"description": "A resource for FiveM and RedM that takes a screenshot of a player and uploads it to a discord's webhook.",
"main": "index.js",
"scripts": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import getPlayerIdentifiers from '../../utils/getPlayerIdentifiers';

class StandaloneScreenshotCommandHandler extends ScreenshotCommandHandler {
public async execute(player: number, args: string[], rawCommand: string): Promise<void> {
if (player === 0 || IsPlayerAceAllowed(player.toString(), 'screenshot.command')) {
if (player === 0 || IsPlayerAceAllowed(player.toString(), 'command.screenshot')) {
const target = args[0];
if (target !== undefined) {
let targetPlayer: string | undefined;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class VrpScreenshotCommandHandler extends ScreenshotCommandHandler {
}

public async execute(player: number, args: string[], rawCommand: string): Promise<void> {
if (player === 0 || await this._vrp.call('hasPermission', await this._vrp.call('getUserId', player), 'screenshot.command')) {
if (player === 0 || await this._vrp.call('hasPermission', await this._vrp.call('getUserId', player), 'command.screenshot')) {
const targetUserId = parseInt(args[0]);
if (targetUserId !== NaN) {
const targetSource = await this._vrp.call('getUserSource', targetUserId) as number | undefined;
Expand Down
2 changes: 1 addition & 1 deletion src/server/utils/VrpProxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class VrpProxy {
});
}

emit(handlerName: string, ...args: any[]): void {
public emit(handlerName: string, ...args: any[]): void {
emit(`${this._name}:proxy`, handlerName, args, this._identifier, -1);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/static/fxmanifest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ game 'common'

author 'Jaime Filho <https://github.com/jaimeadf>'
description "A resource for FiveM and RedM that takes a screenshot of a player and uploads it to a discord's webhook."
version '1.1.3'
version '1.1.4'
url 'https://github.com/jaimeadf/discord-screenshot'

server_script 'dist/server.js'
Expand Down

0 comments on commit 2d911e9

Please sign in to comment.